X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2FMakefile.am;h=d2061f1e05ea75bb7db8fd542dc683d19253bdca;hb=ceb6ba5100c73f6a2b39475c89f3317d64fc9b48;hp=d40cb4a4fea2fbb7327dd95bcb56cdbeb2145be1;hpb=9245bd0e72bbb5cea41f8f6483e7ef3e088a2403;p=lttng-tools.git diff --git a/include/Makefile.am b/include/Makefile.am index d40cb4a4f..d2061f1e0 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -46,20 +46,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 \ - if [ $$(grep -c "^#define GIT_VERSION" "$${version_h}") -gt 0 ]; then \ - ## - ## If there is already a GIT_VERSION defined, - ## we just replace it by the new version - ## - sed -i "s'^#define GIT_VERSION.*$$'#define GIT_VERSION \"$${git_version}\"'" "$${version_h}"; \ - else \ - ## - ## Else, we add a GIT_VERSION define - ## containing our new version. - ## - sed -i "s'^\(#define VERSION_H.*\)$$'\1\n\n#define GIT_VERSION \"$${git_version}\"'" "$${version_h}"; \ - fi; \ + 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)