X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2FMakefile.am;h=767b05b5d99ff38128713925a7dbd71e12579bd7;hp=89b084d01b45a62bcbd59ce62e04292dfcae5cbd;hb=ed343076683ad0b7b7aaa557e30f97429efb82f3;hpb=456b8d40f14be07cca75a9e22ec77976c895d4d5 diff --git a/include/Makefile.am b/include/Makefile.am index 89b084d01..767b05b5d 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -21,8 +21,7 @@ version.h: git_version=""; \ else \ git_describe="$$(git describe)"; \ - if [ "$${git_branch}" == "$${git_describe}" ] || \ - [ "$${git_branch}" == "heads/master" ]; then \ + if [ "$${git_branch}" == "$${git_describe}" ]; then \ git_version="$${git_describe}"; \ else \ git_version="$$(git describe --long --all)"; \ @@ -46,8 +45,8 @@ version.h: ## as the one currently in the file (if there is one), as we ## don't want to update the file if it is already up to date ## - if [ $$(grep -cE "^#define GIT_VERSION \"?$${git_version}\"?$$" "$${version_h}") -eq 0 ]; then \ - sed -i "s'^#define GIT_VERSION.*$$'#define GIT_VERSION \"$${git_version}\"'" "$${version_h}"; \ + if [ $$(grep -cE "^#define GIT_VERSION_SED \"?$${git_version}\"?$$" "$${version_h}") -eq 0 ]; then \ + sed -i "s'^#define GIT_VERSION_SED.*$$'#define GIT_VERSION \"$${git_version}\"'" "$${version_h}"; \ fi; \ fi; \ fi)