Fix: mi: Make sure GIT_VERSION symbol always exist
A message that is not in the archive (sent off-list or not yet received): [email protected]
Just to make sure: I guess this patch is not needed after the changes I did ?
----- Original Message -----
Quoted 77 lines
From: "Jonathan Rajotte Julien" <[email protected]>
To: [email protected]
Sent: Monday, July 28, 2014 5:54:36 PM
Subject: [lttng-dev] [PATCH lttng-tool] Fix: mi: Make sureGIT_VERSIONsymbol always existThe use of
GIT_VERSIONsymbol in mi to express the position in git tree force the need to have it defined for each type of build.This make sure that a build from source file only (git scm not present) is possible.
Signed-off-by Jonathan Rajotte Julien <[email protected]>--- include/Makefile.am | 15 ++------------- include/version.h.tmpl | 6 +++++- 2 files changed, 7 insertions(+), 14 deletions(-)include/Makefile.am +1
-13@@ -47,19 +47,8 @@ version.h: ## 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; \ + sed -i "s'^#define GIT_VERSION.*$$'#define GIT_VERSION\"$${git_version}\"'" "$${version_h}"; \
include/Makefile.am +1
-0+ sed -i "s'^#define GIT_SOURCE.*$$'#define GIT_SOURCE 1'""$${version_h}"; \
include/Makefile.am +0
-0fi; \ fi; \ fi)include/version.h.tmpl +5
-2@@ -20,10 +20,14 @@ #ifndef VERSION_H #define VERSION_H + +#define GIT_SOURCE 0 +#define GIT_VERSION "" + /* * Define the macro containing the FULL version */ -#ifdef GIT_VERSION +#if GIT_SOURCE #define FULL_VERSION "" GIT_VERSION #else /* GIT_VERSION */ #define FULL_VERSION "" VERSION --2.0.0
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
Not needed anymore. Thx for the major change !
Quoted 82 lines · Mathieu Desnoyers
Just to make sure: I guess this patch is not needed after the changes I did ?
----- Original Message -----
Quoted 77 lines
From: "Jonathan Rajotte Julien" <[email protected]>
To: [email protected]
Sent: Monday, July 28, 2014 5:54:36 PM
Subject: [lttng-dev] [PATCH lttng-tool] Fix: mi: Make sureGIT_VERSIONsymbol always existThe use of
GIT_VERSIONsymbol in mi to express the position in git tree force the need to have it defined for each type of build.This make sure that a build from source file only (git scm not present) is possible.
Signed-off-by Jonathan Rajotte Julien <[email protected]>--- include/Makefile.am | 15 ++------------- include/version.h.tmpl | 6 +++++- 2 files changed, 7 insertions(+), 14 deletions(-)include/Makefile.am +1
-13@@ -47,19 +47,8 @@ version.h: ## 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; \ + sed -i "s'^#define GIT_VERSION.*$$'#define GIT_VERSION\"$${git_version}\"'" "$${version_h}"; \
include/Makefile.am +1
-0+ sed -i "s'^#define GIT_SOURCE.*$$'#define GIT_SOURCE 1'""$${version_h}"; \
include/Makefile.am +0
-0fi; \ fi; \ fi)include/version.h.tmpl +5
-2@@ -20,10 +20,14 @@ #ifndef VERSION_H #define VERSION_H + +#define GIT_SOURCE 0 +#define GIT_VERSION "" + /* * Define the macro containing the FULL version */ -#ifdef GIT_VERSION +#if GIT_SOURCE #define FULL_VERSION "" GIT_VERSION #else /* GIT_VERSION */ #define FULL_VERSION "" VERSION --2.0.0
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev