From: Mike Frysinger Date: Fri, 2 May 2008 23:47:25 -0400 Subject: [U-Boot-Users] [PATCH] version_autogenerated.h: use printf rather than echo -n In-Reply-To: <1209779112-24122-1-git-send-email-vapier@gentoo.org> References: <1209779112-24122-1-git-send-email-vapier@gentoo.org> Message-ID: <200805022347.31319.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 ...) -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 827 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20080502/6cdb6ea2/attachment.pgp