From: Peter Tyser Date: Tue, 21 Oct 2008 15:33:49 -0500 Subject: [U-Boot] [PATCH v2] Update U-Boot's build timestamp on every compile In-Reply-To: <20081021201624.3FC4B835694E@gemini.denx.de> References: <1224619693-30738-1-git-send-email-ptyser@xes-inc.com> <20081021201624.3FC4B835694E@gemini.denx.de> Message-ID: <1224621229.18428.397.camel@localhost.localdomain> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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