CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
422a12c6cbf21f4d3448d1b54c55a43e74a444f7
[bootloader.git] / work / u-boot-2011.09.tools2.patch
1 From: Loïc Minier <loic.minier@linaro.org>
2 Date: Mon, 3 Oct 2011 09:57:11 +0000 (+0200)
3 Subject: Safer timestamp_autogenerated.h generation
4 X-Git-Url: http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commitdiff_plain;h=a76406fb05f68bcf0156f456f8ba17ef076cebab
5
6 Safer timestamp_autogenerated.h generation
7
8 Generate timestamp_autogenerated.h as safely as version_autogenerated.h.
9
10 Cc: patches@linaro.org
11 Signed-off-by: Loïc Minier <loic.minier@linaro.org>
12 Acked-by: Mike Frysinger <vapier@gentoo.org>
13 ---
14
15 diff --git a/Makefile b/Makefile
16 index 1a9a4db..5db2e0e 100644
17 --- a/Makefile
18 +++ b/Makefile
19 @@ -570,8 +570,9 @@ $(VERSION_FILE):
20
21 $(TIMESTAMP_FILE):
22 @mkdir -p $(dir $(TIMESTAMP_FILE))
23 - @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
24 - @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@
25 + @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@.tmp
26 + @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@.tmp
27 + @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
28
29 easylogo env gdb:
30 $(MAKE) -C tools/$@ all MTD_VERSION=${MTD_VERSION}