Hi,

attached patch uses the __DATE__ and __TIME__ macros instead of date(1)
calls. User visible results are:
- different date format (no timezone included)
- different time stamps in a single build
- less calls to tools from make (and it also slightly helps ccache do
its magic)

Signed-off-by: Patrick Georgi <[email protected]>
Index: Makefile
===================================================================
--- Makefile    (Revision 5836)
+++ Makefile    (Arbeitskopie)
@@ -319,12 +319,12 @@
        printf "#define __BUILD_H\n\n" >> $(obj)/build.ht
        printf "#define COREBOOT_VERSION \"$(KERNELVERSION)-r$(shell if [ -d 
$(top)/.svn -a -f "`which svnversion`" ]; then svnversion $(top); else if [ -d 
$(top)/.git -a -f "`which git`" ]; then git --git-dir=/$(top)/.git log|grep 
git-svn-id|cut -f 2 -d@|cut -f 1 -d' '|sort -g|tail -1; fi; fi)\"\n" >> 
$(obj)/build.ht
        printf "#define COREBOOT_EXTRA_VERSION \"$(COREBOOT_EXTRA_VERSION)\"\n" 
>> $(obj)/build.ht
-       printf "#define COREBOOT_BUILD \"`LANG= date`\"\n" >> $(obj)/build.ht
+       printf "#define COREBOOT_BUILD __DATE__ \" \" __TIME__\n" >> 
$(obj)/build.ht
        printf "\n" >> $(obj)/build.ht
        printf "#define COREBOOT_COMPILER \"$(shell LANG= $(CC) --version | 
head -n1)\"\n" >> $(obj)/build.ht
        printf "#define COREBOOT_ASSEMBLER \"$(shell LANG= $(AS) --version | 
head -n1)\"\n" >> $(obj)/build.ht
        printf "#define COREBOOT_LINKER \"$(shell LANG= $(LD) --version | head 
-n1)\"\n" >> $(obj)/build.ht
-       printf "#define COREBOOT_COMPILE_TIME \"`LANG= date +%T`\"\n" >> 
$(obj)/build.ht
+       printf "#define COREBOOT_COMPILE_TIME __TIME__\n" >> $(obj)/build.ht
        printf "#define COREBOOT_COMPILE_BY \"$(subst \,@,$(shell 
PATH=$$PATH:/usr/ucb whoami))\"\n" >> $(obj)/build.ht
        printf "#define COREBOOT_COMPILE_HOST \"$(shell hostname -s 
2>/dev/null)\"\n" >> $(obj)/build.ht
        printf "#define COREBOOT_COMPILE_DOMAIN \"$(shell test `uname -s` = 
"Linux" && dnsdomainname || domainname 2>/dev/null)\"\n" >> $(obj)/build.ht
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to