diff mbox

linux-generic: fix date for linux-generic

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

Commit Message

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