From: Loïc Minier Date: Mon, 3 Oct 2011 09:57:11 +0000 (+0200) Subject: Safer timestamp_autogenerated.h generation X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=a76406fb05f68bcf0156f456f8ba17ef076cebab;p=u-boot.git Safer timestamp_autogenerated.h generation Generate timestamp_autogenerated.h as safely as version_autogenerated.h. Cc: patches@linaro.org Signed-off-by: Loïc Minier Acked-by: Mike Frysinger --- diff --git a/Makefile b/Makefile index 1a9a4dbbf0..5db2e0e335 100644 --- a/Makefile +++ b/Makefile @@ -570,8 +570,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"' > $@.tmp + @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@.tmp + @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ easylogo env gdb: $(MAKE) -C tools/$@ all MTD_VERSION=${MTD_VERSION}