From: Andy Shevchenko Date: Fri, 21 Jul 2017 19:32:01 +0000 (+0300) Subject: Makefile: Export build date as integer X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=e7aa9c29475952e28378e27946dfbbdb1e7a3445;p=u-boot.git Makefile: Export build date as integer 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 Reviewed-by: Bin Meng --- diff --git a/Makefile b/Makefile index 3d2b66a91f..78a5f73687 100644 --- a/Makefile +++ b/Makefile @@ -1358,6 +1358,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; \ @@ -1366,6 +1367,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