[U-Boot] [PATCH v1 2/7] Makefile: Export build date as integer

Andy Shevchenko andriy.shevchenko at linux.intel.com
Fri Jul 21 19:32:01 UTC 2017


In some cases we would need build date as integer value.
Export U_BOOT_BUILD_DATE as %Y%m%d integer value.

Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index 452596485d..71de5c656c 100644
--- a/Makefile
+++ b/Makefile
@@ -1352,6 +1352,7 @@ define filechk_timestamp.h
 			LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \
 			LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \
 			LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DMI_DATE "%m/%d/%Y"'; \
+			LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_BUILD_DATE 0x%Y%m%d'; \
 		else \
 			return 42; \
 		fi; \
@@ -1360,6 +1361,7 @@ define filechk_timestamp.h
 		LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \
 		LC_ALL=C date +'#define U_BOOT_TZ "%z"'; \
 		LC_ALL=C date +'#define U_BOOT_DMI_DATE "%m/%d/%Y"'; \
+		LC_ALL=C date +'#define U_BOOT_BUILD_DATE 0x%Y%m%d'; \
 	fi)
 endef
 
-- 
2.13.2



More information about the U-Boot mailing list