[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The non-recursive-gnulib-prefix-hack module
From: |
Pádraig Brady |
Subject: |
Re: The non-recursive-gnulib-prefix-hack module |
Date: |
Sat, 5 Nov 2016 22:42:24 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 05/11/16 18:00, Pádraig Brady wrote:
> On 22/10/16 18:25, Bruno Haible wrote:
>> Hi Jim,
>>
>>>> 2016-10-16 Bruno Haible <address@hidden>
>>>>
>>>> gnulib-tool: Make --create-testdir on all modules work again.
>>>> * gnulib-tool (func_create_testdir): Don't include the
>>>> non-recursive-gnulib-prefix-hack module.
>>> That looks fine. Thanks again.
>>
>> OK, I've pushed it.
>>
>>>> 4) This module was added in September 2012. Does this mean that no one has
>>>> used
>>>> gnulib-tool --create-testdir option to produce a testdir for all
>>>> modules,
>>>> in four years?!
>>>
>>> Probably true.
>>
>> At least Tom Christensen is running gnulib-tool --create-testdir daily
>> (see http://lists.gnu.org/archive/html/bug-gnulib/2016-10/msg00085.html),
>> and he apparently started to exclude the module
>> 'non-recursive-gnulib-prefix-hack'
>> when it started to introduce this problem.
>>
>>>> 1) Both modules/non-recursive-gnulib-prefix-hack and
>>>> m4/non-recursive-gnulib-prefix-hack.m4 hardcode the subdirectory name
>>>> 'lib'.
>>>> (Why does m4/non-recursive-gnulib-prefix-hack.m4 use 'lib' in one place
>>>> and $1
>>>> in another place??)
>>>
>>> That's a bug, but inconsequential. Thank you. I've just pushed a fix for it.
>>
>> This is better now. But still better would be to not hardcode 'lib' at all,
>> and instead use whatever value was passed to gnulib-tool via --source-base.
>> Below is a proposed patch. (The variable $gl_source_base is already used in a
>> similar way in the modules 'localcharset' and 'relocatable-prog'.)
>> Untested on my side; can you please test it the next time you happen to
>> build coreutils?
>
> Unfortunately it fails with:
>
> prefix=lib/
> running: AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose --install
> --force -I m4 --no-recursive
> autoreconf: Entering directory `.'
> autoreconf: running: true --force
> autoreconf: running: aclocal -I m4 --force -I m4
> autoreconf: configure.ac: tracing
> autoreconf: configure.ac: not using Libtool
> autoreconf: running: /usr/bin/autoconf --include=m4 --force
> autoreconf: running: /usr/bin/autoheader --include=m4 --force
> autoreconf: running: automake --add-missing --copy --force-missing
> configure.ac:614: error: required directory ./$gl_source_base does not exist
> lib/gnulib.mk:32: error: required file '$gl_source_base/alloca.c' not found
> Makefile.am:226: 'lib/local.mk' included from here
> lib/local.mk:1: 'lib/gnulib.mk' included from here
> autoreconf: automake failed with exit status: 1
> ./bootstrap: autoreconf failed
>
>
>>
>> Bruno
>>
>>
>> 2016-10-22 Bruno Haible <address@hidden>
>>
>> non-recursive-gnulib-prefix-hack: Don't make assumptions about
>> gnulib-tool's --source-base option value.
>> * modules/non-recursive-gnulib-prefix-hack (configure.ac): Use
>> gl_source_base.
>>
>> diff --git a/modules/non-recursive-gnulib-prefix-hack
>> b/modules/non-recursive-gnulib-prefix-hack
>> index 80bc27f..f938d30 100644
>> --- a/modules/non-recursive-gnulib-prefix-hack
>> +++ b/modules/non-recursive-gnulib-prefix-hack
>> @@ -12,7 +12,7 @@ configure.ac:
>> dnl Run our hack near the end, just before config.status creation.
>> dnl It must happen late, i.e., after gl_LIBOBJS has been finalized.
>> AC_CONFIG_COMMANDS_PRE([
>> - gl_NON_RECURSIVE_GNULIB_PREFIX_HACK([lib])
>> + gl_NON_RECURSIVE_GNULIB_PREFIX_HACK([$gl_source_base])
>> ])
The issue is in m4/non-recursive-gnulib-prefix-hack.m4
There are single quotes around $1 that need to be changed to double quotes.
More problematically AC_CONFIG_LIBOBJ_DIR is used there which
looks like it needs to be initialized before gl_source_base is set.
I'll need to do a lot more digging to figure all that out.
Re: The non-recursive-gnulib-prefix-hack module, Bruno Haible, 2016/11/27