qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: Stop using "which" in ./configure


From: Loïc Minier
Subject: Re: [Qemu-devel] Re: Stop using "which" in ./configure
Date: Wed, 20 Jan 2010 14:54:23 +0100

On Wed, Jan 20, 2010, Juan Quintela wrote:
> +prog_exist() {
> +    prog="$1"
> +    type $1 > /dev/null 2> /dev/null
> +}

 You set prog but you use $1; also, it seems vars in functions should be
 prefixed with local_ in qemu's ./configure.  I was told not to use a
 local var here though.

> -  if test "$solinst" = "/usr/sbin/install" ; then
> +  if type install2 2> /dev/null | grep /usr/bin/install >/dev/null ; then

 install2?

> +      if prog_exist "awk" -a \
> +         prog_exist "grep"; then

 already pointed out, but -a is a feature of "test" and incorrect here;
 you want &&

> -  if test -x "`which texi2html 2>/dev/null`" -a \
> -          -x "`which pod2man 2>/dev/null`" ; then
> +  if prog_exist "texi2html" -a \
> +     prog_exist "pod2man" ; then

 ditto


 Perhaps we should avoid work duplication though?

-- 
Loïc Minier




reply via email to

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