From: Wolfgang Denk Date: Sun, 04 May 2008 00:38:29 +0200 Subject: [U-Boot-Users] [PATCH] version_autogenerated.h: use printf rather than echo -n In-Reply-To: Your message of "Fri, 02 May 2008 23:47:25 EDT." <200805022347.31319.vapier@gentoo.org> Message-ID: <20080503223829.42925247B4@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <200805022347.31319.vapier@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?