diff mbox

linux-generic: fix date for linux-generic

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

Commit Message

Maxim Uvarov May 12, 2015, 1:23 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>
---
 platform/Makefile.inc             | 4 ++++
 platform/linux-generic/odp_impl.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index f232daa..ae20a80 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -14,4 +14,8 @@  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) | 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)