Generate timestamp_autogenerated.h as safely as version_autogenerated.h.

Cc: [email protected]
Signed-off-by: Loïc Minier <[email protected]>
---
 Makefile |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 0892908..2991357 100644
--- a/Makefile
+++ b/Makefile
@@ -568,8 +568,9 @@ $(VERSION_FILE):
 
 $(TIMESTAMP_FILE):
                @mkdir -p $(dir $(TIMESTAMP_FILE))
-               @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
-               @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@
+               @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > [email protected]
+               @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> [email protected]
+               @cmp -s $@ [email protected] && rm -f [email protected] || mv -f [email protected] $@
 
 easylogo env gdb:
        $(MAKE) -C tools/$@ all MTD_VERSION=${MTD_VERSION}
-- 
1.7.5.4

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to