[U-Boot-Users] [PATCH] version_autogenerated.h: use printf rather than echo -n

Mike Frysinger vapier at gentoo.org
Sat May 3 05:47:25 CEST 2008


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 


More information about the U-Boot mailing list