diff mbox

linux-generic: fix date for linux-generic

Message ID 1431437426-27325-1-git-send-email-maxim.uvarov@linaro.org
State New
Headers show

Commit Message

Maxim Uvarov May 12, 2015, 1:30 p.m. UTC
take date as date of the latest commit in ./platform/linux-generic,
not as current compilation date.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 v2: somehow latest change did not amend to v1, use v2.

 platform/Makefile.inc             | 5 +++++
 platform/linux-generic/odp_impl.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

Comments

Mike Holmes May 12, 2015, 6:09 p.m. UTC | #1
On 12 May 2015 at 09:30, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> take date as date of the latest commit in ./platform/linux-generic,
> not as current compilation date.
>
> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
> ---
>  v2: somehow latest change did not amend to v1, use v2.
>
>  platform/Makefile.inc             | 5 +++++
>  platform/linux-generic/odp_impl.c | 2 +-
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/platform/Makefile.inc b/platform/Makefile.inc
> index f232daa..5985559 100644
> --- a/platform/Makefile.inc
> +++ b/platform/Makefile.inc
> @@ -14,4 +14,9 @@ AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
>
>  GIT_DESC !=$(top_srcdir)/scripts/git_hash.sh
>  AM_CFLAGS += "-DGIT_HASH=$(GIT_DESC)"
> +
> +TIMESTAMP =`git log -1 --pretty="%cD"
> $(top_srcdir)/platform/linux-generic/ | tr -d "\n"`
> +AM_CFLAGS += "-DIMPL_TIMESTAMP=\"$(TIMESTAMP)\""
> +
>  AM_CFLAGS += -DPLATFORM=${with_platform}
> +
> diff --git a/platform/linux-generic/odp_impl.c
> b/platform/linux-generic/odp_impl.c
> index 46d0e40..29a1539 100644
> --- a/platform/linux-generic/odp_impl.c
> +++ b/platform/linux-generic/odp_impl.c
> @@ -30,7 +30,7 @@ extern "C" {
>         ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \
>         ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \
>         ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) ") " \
> -       __DATE__ " " __TIME__ " " \
> +       IMPL_TIMESTAMP \
>         ODP_VERSION_TO_STR(GIT_HASH) \
>


>
>  const char *odp_version_impl_str(void)
> --
> 1.9.1
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
diff mbox

Patch

diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index f232daa..5985559 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -14,4 +14,9 @@  AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
 
 GIT_DESC !=$(top_srcdir)/scripts/git_hash.sh
 AM_CFLAGS += "-DGIT_HASH=$(GIT_DESC)"
+
+TIMESTAMP =`git log -1 --pretty="%cD" $(top_srcdir)/platform/linux-generic/ | tr -d "\n"`
+AM_CFLAGS += "-DIMPL_TIMESTAMP=\"$(TIMESTAMP)\""
+
 AM_CFLAGS += -DPLATFORM=${with_platform}
+
diff --git a/platform/linux-generic/odp_impl.c b/platform/linux-generic/odp_impl.c
index 46d0e40..29a1539 100644
--- a/platform/linux-generic/odp_impl.c
+++ b/platform/linux-generic/odp_impl.c
@@ -30,7 +30,7 @@  extern "C" {
 	ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \
 	ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \
 	ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) ") " \
-	__DATE__ " " __TIME__ " " \
+	IMPL_TIMESTAMP \
 	ODP_VERSION_TO_STR(GIT_HASH)
 
 const char *odp_version_impl_str(void)