bug-gnulib
[Top][All Lists]
Advanced

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

Re: auxdir and multiple configure.ac's


From: Simon Josefsson
Subject: Re: auxdir and multiple configure.ac's
Date: Sun, 10 May 2009 22:07:41 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.93 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Simon Josefsson wrote:
>> However, gnulib-tool --import puts build-aux files in the wrong
>> directory for the lib/gl/m4 base.  The reason is because the --auxdir
>> variable is read from the top-level configure.ac AC_CONFIG_AUX_DIR.
>> 
>> One work around is to run gnulib-tool --import two times
>
> Yes, definitely. When you have two configure.acs, you also need two
> invocations of gnulib-tool, because
>   - gnulib-tool extracts some information from configure.ac (such as
>     the auxdir, precisely),
>   - some macros refer to gnulib-tool's --source-base argument (see e.g.
>     modules/getloadavg).
>
>> and in the 
>> second run, specify the --aux-dir parameter explicitly.  However, that
>> leads to incorrect paths in lib/gl/Makefile.am.
>
> I hope you called gnulib-tool once in the top directory and once in lib/
> (with directory names relative to lib/, of course) ?
> The symptoms that you mention sound like you have invoked it twice from
> the same directory.

No, I just invoke 'gnulib-tool --import' once in the top-level
directory.  Gnulib-tool notices the gnulib directories beneath lib/ as
well, and will import files to lib/.  But the paths produced in the
Makefile.am are incorrect, because gnulib generate them as being
relative to the top-level configure.ac, not the lib/configure.ac.

How do I stop gnulib-tool from importing gnulib files in lib/, so I can
invoke gnulib-tool a second time in that directory?

> Ralf Wildenhues wrote:
>
>> why can't your two configure.ac scripts share a
>> build-aux directory?  The toplevel one could have
>>   AC_CONFIG_AUX_DIR([lib/build-aux])
>>
>> while lib/configure.ac had
>>   AC_CONFIG_AUX_DIR([build-aux])
>
> You can also use the build-aux directory. Then the toplevel configure.ac
> has
>      AC_CONFIG_AUX_DIR([build-aux])
> and the lib/configure.ac has
>      AC_CONFIG_AUX_DIR([../build-aux])
> Note that with this setup, a "cd lib; make dist" will create a tarball
> that no longer unpacks into a single directory.

Because 'make dist' needs to work in the lib/ directory, with no
dependencies on things outside the lib/ directory (to make
libgsasl-*.tar.gz self-contained), I prefer the first variant.

/Simon




reply via email to

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