[U-Boot] [PATCH v2] Update U-Boot's build timestamp on every compile
Wolfgang Denk
wd at denx.de
Tue Oct 21 22:16:24 CEST 2008
Dear Peter Tyser,
In message <1224619693-30738-1-git-send-email-ptyser at xes-inc.com> you wrote:
> Use the GNU 'date' command to auto-generate a new U-Boot
> timestamp on every compile.
...
> --- a/Makefile
> +++ b/Makefile
> @@ -368,6 +368,10 @@ $(VERSION_FILE):
> @( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' "$(U_BOOT_VERSION)" \
> '$(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion $(TOPDIR))' \
> ) > $@.tmp
> + @( printf '#define U_BOOT_DATE "%s"\n' '$(shell date +"%b %d %C%y")' \
> + ) >> $@.tmp
> + @( printf '#define U_BOOT_TIME "%s"\n' '$(shell date +"%T")' \
> + ) >> $@.tmp
> @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
Please do not do this here. Use a separate target instead.
As you can see, we take care NOT to create a new VERSION_FILE for
each build, but only when it eally changed. Your change forces it to
change with each build, which we tried to avoid.
Best regards,
Wolfgang Denk
--
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
It is impractical for the standard to attempt to constrain the
behavior of code that does not obey the constraints of the standard.
- Doug Gwyn
More information about the U-Boot
mailing list