On 03/07/2012 02:16 PM, Peter Maydell wrote: > Use the same mechanism we use for printing the configure command > line to config-host.mak to print it to config.log. This fixes a > bug where the config.log version didn't quote arguments with spaces. > > # Print a helpful header at the top of config.log > echo "# QEMU configure log $(date)" >> config.log > -echo "# produced by $0 $*" >> config.log > +printf "# Configured with:" >> config.log > +printf " '%s'" "$0" "$@" >> config.log > +echo >> config.log > echo "#" >> config.log >
This still breaks if an argument has a single quote. bash's printf's %q deals with this correctly, but not sure how portable it is. -- error compiling committee.c: too many arguments to function