[Top][All Lists]

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

Re: auxdir and multiple configure.ac's

From: Bruno Haible
Subject: Re: auxdir and multiple configure.ac's
Date: Sat, 9 May 2009 03:12:01 +0200
User-agent: KMail/1.9.9

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.

> 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.

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
and the lib/configure.ac has
Note that with this setup, a "cd lib; make dist" will create a tarball
that no longer unpacks into a single directory.

> However it doesn't work.  gnulib-tool puts all the build-aux files in
> gl/build-aux/?!  I suspect it rewrites lib/build-aux/ to gl/build-aux

Where and with what options did you invoke gnulib-tool?

> diff --git a/gnulib-tool b/gnulib-tool
> index 2c00b1f..6290ac9 100755
> --- a/gnulib-tool
> +++ b/gnulib-tool
> @@ -2918,17 +2918,17 @@ 
> s,^\(.................................................[^ ]*\) *,
>    fi
>    sed_rewrite_old_files="\
> +    s,^lib/,$cached_sourcebase/,
>      s,^build-aux/,$auxdir/,
>      s,^doc/,$cached_docbase/,
> -    s,^lib/,$cached_sourcebase/,
>      s,^m4/,$cached_m4base/,
>      s,^tests/,$cached_testsbase/,
>      s,^tests=lib/,$cached_testsbase/,
>      s,^top/,,"

This patch looks like a nop. Every file name is transformed through exactly
once of sed_rewrite_old_files, sed_rewrite_new_files, sed_rewrite_files.
These transforms are not iterated.


reply via email to

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