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: John W. Eaton
Subject: Re: default gnulib_path in build-aux/bootstrap script
Date: Fri, 14 Jan 2011 06:26:18 -0500

On 14-Jan-2011, Jim Meyering wrote:

| John W. Eaton wrote:
| 
| > I updated Octave's copy of the bootstrap script from gnulib's version
| > today and hit an error because gnulib_path was set to ''.  The code in
| > the bootstrap script for this is
| >
| >   git_modules_config () {
| >     test -f .gitmodules && git config --file .gitmodules "$@"
| >   }
| >
| >   gnulib_path=`git_modules_config submodule.gnulib.path`
| >   : ${gnulib_path=gnulib}
| >
| > I don't have a .gitmodules file, so git_modules_config doesn't return
| > anything and gnulib_path is set to '' before the
| >
| >   : ${gnulib_path=gnulib}
| >
| > 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.

Thanks, that seems fine to me.

jwe



reply via email to

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