Received: from [140.186.70.92] (port=54764 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pdgz0-0001f6-Us for qemu-devel@nongnu.org; Fri, 14 Jan 2011 05:34:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pdgyz-0007gi-OR for qemu-devel@nongnu.org; Fri, 14 Jan 2011 05:34:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pdgyz-0007ga-GQ for qemu-devel@nongnu.org; Fri, 14 Jan 2011 05:34:13 -0500 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 1/8] fix 'no such file' error from make_device_config.sh References: <1294900477-23722-1-git-send-email-daahern@cisco.com> <1294900477-23722-2-git-send-email-daahern@cisco.com> <4D2F0EF6.7050905@cisco.com> Date: Fri, 14 Jan 2011 11:34:10 +0100 In-Reply-To: <4D2F0EF6.7050905@cisco.com> (David Ahern's message of "Thu, 13 Jan 2011 07:40:54 -0700") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Ahern Cc: qemu-devel@nongnu.org David Ahern writes: > On 01/13/11 06:43, Markus Armbruster wrote: >> David Ahern writes: >> >>> make_device_config currently emits an error: >>> >>> make config-all-devices.mak >>> GEN x86_64-softmmu/config-devices.mak >>> /home/dsa/kvm/releases/qemu.git/make_device_config.sh: line 21: /home/dsa/kvm/releases/qemu.git/default-configs/pci.mak : No such file or directory >>> >>> /bin/sh does not like the file redirection for tr so change it to cat. >>> >>> Signed-off-by: David Ahern >>> --- >>> make_device_config.sh | 2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >>> >>> diff --git a/make_device_config.sh b/make_device_config.sh >>> index 596fc5b..1ce4088 100644 >>> --- a/make_device_config.sh >>> +++ b/make_device_config.sh >>> @@ -18,7 +18,7 @@ process_includes () { >>> >>> f=$src >>> while [ -n "$f" ] ; do >>> - f=`tr -d '\r' < $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` >>> + f=`cat $f | tr -d '\r' | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` >>> [ $? = 0 ] || exit 1 >>> all_includes="$all_includes $f" >>> done >> >> This sweeps the real error under the carpet: $f has a trailing space. >> >> What about: >> >> diff --git a/make_device_config.sh b/make_device_config.sh >> index 596fc5b..711829c 100644 >> --- a/make_device_config.sh >> +++ b/make_device_config.sh >> @@ -18,7 +18,7 @@ process_includes () { >> >> f=$src >> while [ -n "$f" ] ; do >> - f=`tr -d '\r' < $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'` >> + f=`tr -d '\r' <"$f" | awk '/^include / {print "'$src_dir'/" $2}'` >> [ $? = 0 ] || exit 1 >> all_includes="$all_includes $f" >> done > > That works too. Care to respin your patch? > Any idea why the '%/config-devices.mak' rule does not work for a build > directory != src directory? > > e.g., src=/my/qemu.git, build=/tmp/build-qemu > > x86_64-softmmu/config-devices.mak is not created, so > config-all-devices.mak is empty and the build blows up. Should be debuggable :) "mkdir bld && cd bld && ./configure --disable-werror && make" works for me. config-all-devices.mak has some 80 entries.