From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42721 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8HxP-000620-9g for qemu-devel@nongnu.org; Fri, 08 Apr 2011 16:07:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q8HxO-0004m2-D9 for qemu-devel@nongnu.org; Fri, 08 Apr 2011 16:07:03 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:36599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q8HxO-0004lw-7G for qemu-devel@nongnu.org; Fri, 08 Apr 2011 16:07:02 -0400 Received: by gyg4 with SMTP id 4so1905332gyg.4 for ; Fri, 08 Apr 2011 13:07:01 -0700 (PDT) Message-ID: <4D9F6AE1.1030808@codemonkey.ws> Date: Fri, 08 Apr 2011 15:06:57 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] configure: avoid basename usage message References: <20110408163349.GA1212@schlenkerla.am.freescale.net> <20110408185602.GA15734@stefanha-thinkpad.localdomain> In-Reply-To: <20110408185602.GA15734@stefanha-thinkpad.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Scott Wood , qemu-devel@nongnu.org On 04/08/2011 01:56 PM, Stefan Hajnoczi wrote: > On Fri, Apr 08, 2011 at 11:33:49AM -0500, Scott Wood wrote: >> diff --git a/configure b/configure >> index ae97e11..c5b85fe 100755 >> --- a/configure >> +++ b/configure >> @@ -1233,7 +1233,8 @@ else >> fi >> sdl=no >> fi >> -if test -n "$cross_prefix"&& test "`basename $sdlconfig`" = sdl-config; then >> +if test -n "$cross_prefix" -a -n "$sdlconfig"&& \ >> + test "`basename $sdlconfig`" = sdl-config; then > Instead of doing test -n "$sdlconfig" first with short-circuit > evaluation, I think would should do: > > test $(basename "$sdlconfig") = sdl-config $() is a bash-ism FYI. Regards, Anthony Liguori > Then you don't need to test sdlconfig because basename will produce an > empty string without error. > > Stefan >