From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCslZ-00025A-5a for qemu-devel@nongnu.org; Wed, 17 Dec 2008 04:32:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCslX-00024N-Bb for qemu-devel@nongnu.org; Wed, 17 Dec 2008 04:32:28 -0500 Received: from [199.232.76.173] (port=47108 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCslX-00024D-5j for qemu-devel@nongnu.org; Wed, 17 Dec 2008 04:32:27 -0500 Received: from acsinet12.oracle.com ([141.146.126.234]:60488) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LCslW-0004Tq-Pv for qemu-devel@nongnu.org; Wed, 17 Dec 2008 04:32:27 -0500 Received: from acsinet13.oracle.com (acsinet13.oracle.com [141.146.126.235]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBH9W0QX010401 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Dec 2008 09:32:01 GMT Received: from acsmt704.oracle.com (acsmt704.oracle.com [141.146.40.82]) by acsinet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBH9Wmqa005914 for ; Wed, 17 Dec 2008 09:32:49 GMT Message-ID: <4948C721.2060507@oracle.com> Date: Wed, 17 Dec 2008 09:32:17 +0000 From: John Haxby MIME-Version: 1.0 Subject: Re: [Qemu-devel] configure echo usage References: <5ED905FB-CB4B-45D3-99B7-3D415750F2C4@sonous.com> In-Reply-To: <5ED905FB-CB4B-45D3-99B7-3D415750F2C4@sonous.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Lev Lvovsky wrote: > > bash-3.2$ svn diff configure > Index: configure > =================================================================== > --- configure (revision 6069) > +++ configure (working copy) > @@ -1094,8 +1094,7 @@ > test -f $config_h && mv $config_h ${config_h}~ > > echo "# Automatically generated by configure - do not modify" > > $config_mak > -echo -n "# Configured with:" >> $config_mak > -printf " '%s'" "$0" "$@" >> $config_mak > +printf "# Configured with: $0 $@" >> $config_mak > echo >> $config_mak > echo "/* Automatically generated by configure - do not modify */" > > $config_h > > > That doesn't give the same output: the original puts each of $0 and the $@'s with single quotes around them in the config file, yours misses out the quotes. Replacing the original echo -n, printf and echo like this would work though: echo "# Configured with:$(printf " '%s'" "$0" "$@")" >> $config_mak If the OS X shell doesn't do $(...) then this will work, albeit at the cost of readabilty echo "# Configured with:"`printf " '%s'" "$0" "$@"` >> $config_mak (those pesky backquotes are harder to see and for the ultra-picky it's not quite the same thing). jch