summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Minier <loic.minier@linaro.org>2011-10-03 11:57:11 +0200
committerWolfgang Denk <wd@denx.de>2011-10-06 20:20:15 +0200
commita76406fb05f68bcf0156f456f8ba17ef076cebab (patch)
tree725a06e4888d03a0d609c81406a0567f2ba5a42b
parent249b53a6129bc24d26e52718a8a7b42751f11033 (diff)
downloadtalos-obmc-uboot-a76406fb05f68bcf0156f456f8ba17ef076cebab.tar.gz
talos-obmc-uboot-a76406fb05f68bcf0156f456f8ba17ef076cebab.zip
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 <loic.minier@linaro.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
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}
OpenPOWER on IntegriCloud