[U-Boot-Users] [PATCH] version_autogenerated.h: use printf rather than echo -n
Wolfgang Denk
wd at denx.de
Sun May 4 00:38:29 CEST 2008
In message <200805022347.31319.vapier at gentoo.org> you wrote:
>
> On Friday 02 May 2008, Mike Frysinger wrote:
> > $(VERSION_FILE):
> > - @( echo -n "#define U_BOOT_VERSION \"U-Boot " ; \
> > - echo -n "$(U_BOOT_VERSION)" ; \
> > - echo -n $(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion \
> > - $(TOPDIR)) ; \
> > - echo "\"" ) > $@.tmp
> > + @( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' "$(U_BOOT_VERSION)"> \
> > + $(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion $(TOPDIR)) \
> > + ) > $@.tmp
>
> i realized this may break if the setlocalversion generates a space ... but i
> dont think that's possible ? if it is, then we should quote the $(shell ...)
I added quotes, just to be sure.
Thanks.
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
Thought for the day: What if there were no hypothetical situations?
More information about the U-Boot
mailing list