Skip to contentSkip to conversation

Makefile: always call date with LANG=C set

PATCH New Ilya Yanok 3 participants 3 messages Jun 21, 2010 – Jun 22, 2010 Kbuild

lore
Share & tools
lore

Ilya Yanok

author
#0 lore raw

PATCH 1/1 Makefile: always call date with LANG=C set

Ensure that date is called only with LANG=C locale set to make dates locale neutral thus preventing lurking of non-ASCII characters into U-Boot binary.

---
 Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Makefile +3 -3
index 3e11f6f..685b7ef 100644
@@ -385,8 +385,8 @@ $(VERSION_FILE):
 		@cmp -s $@ [email protected] && rm -f [email protected] || mv -f [email protected] $@
 
 $(TIMESTAMP_FILE):
-		@date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
-		@date +'#define U_BOOT_TIME "%T"' >> $@
+		@LANG=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
+		@LANG=C date +'#define U_BOOT_TIME "%T"' >> $@
 
 gdbtools:
 		$(MAKE) -C tools/gdb all || exit 1
@@ -2476,6 +2476,6 @@ endif
 
 backup:
 	F=`basename $(TOPDIR)` ; cd .. ; \
-	gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
+	gtar --force-local -zcvf `LANG=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
 
 #########################################################################
Signature · 1 line
1.6.2.5
#1 lore raw

PATCH 1/1 Makefile: always call date with LANG=C set

Quoted 3 lines · On Monday, June 21, 2010 10:13:21 Ilya Yanok wrote:

Ensure that date is called only with LANG=C locale set to make dates locale neutral thus preventing lurking of non-ASCII characters into U-Boot binary.

use LC_ALL, not LANG
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100621/c288a959/attachment.pgp

#2 lore raw

PATCH 1/1 Makefile: always call date with LANG=C set

In reply to Ilya Yanok

Dear Ilya Yanok,

Quoted 8 lines · In message <[email protected]> you wrote:

Ensure that date is called only with LANG=C locale set to make dates locale neutral thus preventing lurking of non-ASCII characters into U-Boot binary.

---
 Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Applied after incorporating Mike's suggestion to change LANG= into LC_ALL=. Thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Status quo. Latin for "the mess we're in."