qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] configure: avoid basename usage message


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] configure: avoid basename usage message
Date: Fri, 08 Apr 2011 15:06:57 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]