bug-gnulib
[Top][All Lists]
Advanced

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

Re: default gnulib_path in build-aux/bootstrap script


From: Jim Meyering
Subject: Re: default gnulib_path in build-aux/bootstrap script
Date: Thu, 20 Jan 2011 08:54:46 +0100

Eric Blake wrote:
> 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.

I've just pushed that.



reply via email to

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