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