bug-gnulib
[Top][All Lists]
Advanced

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

Re: configmake module and automake 1.9.6


From: Eric Blake
Subject: Re: configmake module and automake 1.9.6
Date: Tue, 14 Dec 2010 14:54: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 12/14/2010 02:33 PM, Bruno Haible wrote:
>>> In configure.ac add:
>>>
>>>   dnl Installation directories.
>>>   dnl Remove this when you can assume autoconf >= 2.60.
>>>   AC_SUBST([localedir], ['${datadir}/locale'])
> 
> This is the essential change.

It's also the change that is most likely to cause conflicts if done
incorrectly - that is, we don't want to do this if autoconf and/or
automake is new enough to already cover it.

> 
>> But the Makefile.am in question is generated by gnulib.  Adding it to
>> the top level won't affect the generation of configmake.h.
> 
> Then you could use gnulib-tool's option --makefile-name and include the
> gnulib-generated Makefile.am fragment from your real Makefile.am.

But the whole point of the configmake module is that it should just work
without the user having to specify --makefile-name.  At least we can
inject both configure.ac and Makefile.am snippets into the configmake
module.

However, it appears you are right; after testing, I confirmed that the
AC_SUBST edit to configure.ac plus a single mention of $(localedir) in
the gnulib-level Makefile.am (already present, thanks to the configmake
substitutions) is sufficient to get even automake 1.9.6 to automatically
populate $(localedir) = @localedir@, without me having to edit any
Makefile.am.
> 
>>  # Listed in the same order as the GNU makefile conventions.
>>  # The Automake-defined pkg* macros are appended, in the order
>>  # listed in the Automake 1.10a+ documentation.
>> +# Support newer definitions even when using older automake 1.9.6
> 
> The Automake version is probably irrelevant here. It's the Autoconf
> version that matters.

Oh; it's a mix of both autoconf and automake macros (autoconf AC_SUBST's
localedir, but only automake 1.11 AC_SUBST's pkglibexecdir); the comment
in modules/configmake only mentioned automake, but both tools have a
hand in feeding configmake.h.

>>        echo '#define DATAROOTDIR "$(datarootdir)"'; \
>>        echo '#define DATADIR "$(datadir)"'; \
>> +      echo '#ifndef DATAROOTDIR'; \
>> +      echo '# define DATAROOTDIR DATADIR'; \
>> +      echo '#endif; \

> 
> I would prefer to do this at configure.ac level. Because if a package has
> C code which accesses DATAROOTDIR or LOCALEDIR, chances are high that it
> also has Makefile rules that install files into $(datarootdir) or 
> $(localedir).
> The change that you propose handles the C code but not the Makefile.am rules.

Okay, then, I'm back to trying to modify the configmake module's
configure.ac section, in a way that is friendly to the autotools already
providing a definition, and which allows use of these variables
throughout makefiles in addition to C files.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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