[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: default gnulib_path in build-aux/bootstrap script
From: |
Eric Blake |
Subject: |
Re: default gnulib_path in build-aux/bootstrap script |
Date: |
Fri, 14 Jan 2011 08:13:12 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
On 01/14/2011 01:56 AM, Jim Meyering wrote:
>> line, so then it remains ''. Shouldn't this be
>>
>> : ${gnulib_path:=gnulib}
>>
>> (or equivalent if this method is not sufficiently portable) so that it
>> will be set to the default value if $gnulib_path is unset or empty,
>> not just if it is unset? It looks to me that $gnulib_path will always
>> be set, to the default value of "gnulib" will never be used.
>
> Here's a proposed patch.
> There may be another way to do it using something like := as you suggest,
> but using an explicit "test and set" seems safer, given the portability
> caveats in autoconf's shellology section.
: "${gnulib_path:=gnulib}"
is (believe it or not) portable.
: ${gnulib_path:=gnulib}
is also portable, but if $gnulib_path expands to any glob characters, it
wastes time doing unnecessary file name splitting.
>
> gnulib_path=`git_modules_config submodule.gnulib.path`
> -: ${gnulib_path=gnulib}
> +test -z "$gnulib_path" && gnulib_path=gnulib
This is less compact, but also portable, so no need to change it.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature