* Re: [PATCH lttng-tool] Fix: mi: Make sure GIT_VERSION symbol always exist
[not found] <1406584476-32009-1-git-send-email-jonathan.r.julien@gmail.com>
@ 2014-07-31 21:17 ` Mathieu Desnoyers
[not found] ` <649476030.24171.1406841437430.JavaMail.zimbra@efficios.com>
1 sibling, 0 replies; 3+ messages in thread
From: Mathieu Desnoyers @ 2014-07-31 21:17 UTC (permalink / raw)
To: Jonathan Rajotte Julien; +Cc: lttng-dev
Just to make sure: I guess this patch is not needed
after the changes I did ?
----- Original Message -----
> From: "Jonathan Rajotte Julien" <jonathan.r.julien@gmail.com>
> To: lttng-dev@lists.lttng.org
> Sent: Monday, July 28, 2014 5:54:36 PM
> Subject: [lttng-dev] [PATCH lttng-tool] Fix: mi: Make sure GIT_VERSION symbol always exist
>
> The use of GIT_VERSION symbol 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 <jonathan.r.julien@gmail.com>
> ---
> include/Makefile.am | 15 ++-------------
> include/version.h.tmpl | 6 +++++-
> 2 files changed, 7 insertions(+), 14 deletions(-)
>
> diff --git a/include/Makefile.am b/include/Makefile.am
> index d40cb4a..ca515da 100644
> --- a/include/Makefile.am
> +++ b/include/Makefile.am
> @@ -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}"; \
> + sed -i "s'^#define GIT_SOURCE.*$$'#define GIT_SOURCE 1'"
> "$${version_h}"; \
> fi; \
> fi; \
> fi)
> diff --git a/include/version.h.tmpl b/include/version.h.tmpl
> index 2cab733..3ef6905 100644
> --- a/include/version.h.tmpl
> +++ b/include/version.h.tmpl
> @@ -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
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH lttng-tool] Fix: mi: Make sure GIT_VERSION symbol always exist
[not found] ` <649476030.24171.1406841437430.JavaMail.zimbra@efficios.com>
@ 2014-08-01 13:02 ` Jonathan Rajotte-Julien
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Rajotte-Julien @ 2014-08-01 13:02 UTC (permalink / raw)
To: lttng-dev
Not needed anymore. Thx for the major change !
On 07/31/2014 05:17 PM, Mathieu Desnoyers wrote:
> Just to make sure: I guess this patch is not needed
> after the changes I did ?
>
> ----- Original Message -----
>> From: "Jonathan Rajotte Julien" <jonathan.r.julien@gmail.com>
>> To: lttng-dev@lists.lttng.org
>> Sent: Monday, July 28, 2014 5:54:36 PM
>> Subject: [lttng-dev] [PATCH lttng-tool] Fix: mi: Make sure GIT_VERSION symbol always exist
>>
>> The use of GIT_VERSION symbol 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 <jonathan.r.julien@gmail.com>
>> ---
>> include/Makefile.am | 15 ++-------------
>> include/version.h.tmpl | 6 +++++-
>> 2 files changed, 7 insertions(+), 14 deletions(-)
>>
>> diff --git a/include/Makefile.am b/include/Makefile.am
>> index d40cb4a..ca515da 100644
>> --- a/include/Makefile.am
>> +++ b/include/Makefile.am
>> @@ -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}"; \
>> + sed -i "s'^#define GIT_SOURCE.*$$'#define GIT_SOURCE 1'"
>> "$${version_h}"; \
>> fi; \
>> fi; \
>> fi)
>> diff --git a/include/version.h.tmpl b/include/version.h.tmpl
>> index 2cab733..3ef6905 100644
>> --- a/include/version.h.tmpl
>> +++ b/include/version.h.tmpl
>> @@ -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
>> lttng-dev@lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH lttng-tool] Fix: mi: Make sure GIT_VERSION symbol always exist
@ 2014-07-28 21:54 Jonathan Rajotte Julien
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Rajotte Julien @ 2014-07-28 21:54 UTC (permalink / raw)
To: lttng-dev
The use of GIT_VERSION symbol 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 <jonathan.r.julien@gmail.com>
---
include/Makefile.am | 15 ++-------------
include/version.h.tmpl | 6 +++++-
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/include/Makefile.am b/include/Makefile.am
index d40cb4a..ca515da 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -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}"; \
+ sed -i "s'^#define GIT_SOURCE.*$$'#define GIT_SOURCE 1'" "$${version_h}"; \
fi; \
fi; \
fi)
diff --git a/include/version.h.tmpl b/include/version.h.tmpl
index 2cab733..3ef6905 100644
--- a/include/version.h.tmpl
+++ b/include/version.h.tmpl
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-01 13:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1406584476-32009-1-git-send-email-jonathan.r.julien@gmail.com>
2014-07-31 21:17 ` [PATCH lttng-tool] Fix: mi: Make sure GIT_VERSION symbol always exist Mathieu Desnoyers
[not found] ` <649476030.24171.1406841437430.JavaMail.zimbra@efficios.com>
2014-08-01 13:02 ` Jonathan Rajotte-Julien
2014-07-28 21:54 Jonathan Rajotte Julien
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.