[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: auxdir and multiple configure.ac's
From: |
Ralf Wildenhues |
Subject: |
Re: auxdir and multiple configure.ac's |
Date: |
Sat, 9 May 2009 07:41:28 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hi Bruno,
* Bruno Haible wrote on Sat, May 09, 2009 at 03:12:01AM CEST:
> 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.
And it will likely not pass a "cd lib; make distcheck", although I admit
to not have tried that. If you ever use 'SUBDIRS = ../build-aux' then
you need to use post-1.10.2 Automake, however.
> > --- 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.
I think Simon meant that if, say, $auxdir matches "^lib/", then the
order of the substitutions is relevant. One way to avoid potential
ordering issues is to use a construct like this:
t clear
:clear
s,^build-aux/,quuxl$auxdir/,
s,^lib/,quuxl$cached_sourcebase/,
...
t fixup
b
:fixup
s,^quuxl,,
where "quuxl" is an arbitrary string that prevents any of the later
substitutions from matching (the 'clear' part being only for an IRIX sed
bug described in the Autoconf manual).
Cheers,
Ralf
- auxdir and multiple configure.ac's, Simon Josefsson, 2009/05/07
- Re: auxdir and multiple configure.ac's, Ralf Wildenhues, 2009/05/07
- Re: auxdir and multiple configure.ac's, Simon Josefsson, 2009/05/10
- Re: auxdir and multiple configure.ac's, Bruno Haible, 2009/05/10
- Re: auxdir and multiple configure.ac's, Simon Josefsson, 2009/05/11
- Re: auxdir and multiple configure.ac's, Ralf Wildenhues, 2009/05/11