diff options
author | Peter Tyser <ptyser@xes-inc.com> | 2008-11-03 09:30:59 -0600 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-12-06 23:36:43 +0100 |
commit | 561858ee7d0274c3e89dc98d4d0698cb6fcf6fd9 (patch) | |
tree | 592e0f4f06597a923de9c0ae3afa762ca517ee04 /Makefile | |
parent | 1450c4a6682378567030414a9f1198c39b7730c7 (diff) |
Update U-Boot's build timestamp on every compile
Use the GNU 'date' command to auto-generate a new U-Boot
timestamp on every compile.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -30,6 +30,7 @@ U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) else U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION) endif +TIMESTAMP_FILE = $(obj)include/timestamp_autogenerated.h VERSION_FILE = $(obj)include/version_autogenerated.h HOSTARCH := $(shell uname -m | \ @@ -261,7 +262,7 @@ LIBS += api/libapi.a LIBS += post/libpost.a LIBS := $(addprefix $(obj),$(LIBS)) -.PHONY : $(LIBS) $(VERSION_FILE) +.PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE) LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a LIBBOARD := $(addprefix $(obj),$(LIBBOARD)) @@ -353,13 +354,13 @@ $(SUBDIRS): depend $(obj)include/autoconf.mk $(LDSCRIPT): depend $(obj)include/autoconf.mk $(MAKE) -C $(dir $@) $(notdir $@) -$(NAND_SPL): $(VERSION_FILE) $(obj)include/autoconf.mk +$(NAND_SPL): $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk $(MAKE) -C nand_spl/board/$(BOARDDIR) all $(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin $(obj)include/autoconf.mk cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin -$(ONENAND_IPL): $(VERSION_FILE) $(obj)include/autoconf.mk +$(ONENAND_IPL): $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk $(MAKE) -C onenand_ipl/board/$(BOARDDIR) all $(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin $(obj)include/autoconf.mk @@ -372,6 +373,10 @@ $(VERSION_FILE): ) > $@.tmp @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ +$(TIMESTAMP_FILE): + @date +'#define U_BOOT_DATE "%b %d %C%y"' > $@ + @date +'#define U_BOOT_TIME "%T"' >> $@ + gdbtools: $(MAKE) -C tools/gdb all || exit 1 @@ -381,7 +386,7 @@ updater: env: $(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1 -depend dep: $(VERSION_FILE) +depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir _depend ; done TAG_SUBDIRS += include @@ -462,7 +467,7 @@ sinclude $(obj)include/autoconf.mk.dep else # !config.mk all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \ $(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \ -$(SUBDIRS) $(VERSION_FILE) gdbtools updater env depend \ +$(SUBDIRS) $(TIMESTAMP_FILE) $(VERSION_FILE) gdbtools updater env depend \ dep tags ctags etags cscope $(obj)System.map: @echo "System not configured - see README" >&2 @ exit 1 @@ -3274,7 +3279,7 @@ clean: @rm -f $(obj)include/bmp_logo.h @rm -f $(obj)nand_spl/{u-boot-spl,u-boot-spl.map,System.map} @rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl-2k.bin,ipl-4k.bin,ipl.map} - @rm -f $(obj)api_examples/demo $(VERSION_FILE) + @rm -f $(obj)api_examples/demo $(TIMESTAMP_FILE) $(VERSION_FILE) @find $(OBJTREE) -type f \ \( -name 'core' -o -name '*.bak' -o -name '*~' \ -o -name '*.o' -o -name '*.a' \) -print \ |