[U-Boot] [PATCH v2] Update U-Boot's build timestamp on every compile

Peter Tyser ptyser at xes-inc.com
Tue Oct 21 22:33:49 CEST 2008


Hi Wolfgang,

> > --- 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.

How does a $(TIMESTAMP_FILE) target of
$(obj)include/timestamp_autogenerated.h sound?  An include/timestamp.h
file would also be added which includes
included/timestamp_autogenerated.h.

Best,
Peter



More information about the U-Boot mailing list