From a76406fb05f68bcf0156f456f8ba17ef076cebab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lo=C3=AFc=20Minier?= Date: Mon, 3 Oct 2011 11:57:11 +0200 Subject: [PATCH] Safer timestamp_autogenerated.h generation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Generate timestamp_autogenerated.h as safely as version_autogenerated.h. Cc: patches@linaro.org Signed-off-by: Loïc Minier Acked-by: Mike Frysinger --- Makefile | 5 +++-- 1 file 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} -- 2.39.5