From: Alexandre Duret-Lutz Date: Tue, 23 Sep 2003 19:32:58 +0000 (+0000) Subject: * aclocal.in (write_aclocal): Consider files with relative X-Git-Tag: Release-1-7b~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2470b836f39444a3340333aa6305790b68bb6fc;p=thirdparty%2Fautomake.git * aclocal.in (write_aclocal): Consider files with relative paths as local to the project, i.e., subject to m4_include. * tests/subpkg.test (ACLOCAL_AMFLAGS): Make sure m4_include is also used for .m4 files in the outer project. --- diff --git a/ChangeLog b/ChangeLog index dca3139e6..dc112adb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2003-09-23 Alexandre Duret-Lutz + * aclocal.in (write_aclocal): Consider files with relative + paths as local to the project, i.e., subject to m4_include. + * tests/subpkg.test (ACLOCAL_AMFLAGS): Make sure m4_include + is also used for .m4 files in the outer project. + Support for multiple inputs in AC_CONFIG_FILES. Requested long ago by Harlan Stenn. * automake.in (handle_dist): Remove unused argument $makefile. diff --git a/aclocal.in b/aclocal.in index 8a1e612ee..3b2dd4d94 100644 --- a/aclocal.in +++ b/aclocal.in @@ -511,11 +511,10 @@ sub write_aclocal ($@) my $mtime = mtime $file; $greatest_mtime = $mtime if $greatest_mtime < $mtime; - # If the file to add looks like path outside the project, - # copy it to the output. - # The regex catches filenames starting with things like - # / \ c:\ ../ ./../ etc. - if ($file =~ m,^(?:(?:\w:)?[\\/]|(?:\.[\\/]+)*\.\.[\\/]),) + # If the file to add looks like outside the project, copy it + # to the output. The regex catches filenames starting with + # things like `/', `\', or `c:\'. + if ($file =~ m,^(?:\w:)?[\\/],) { $output .= $file_contents{$file} . "\n"; } diff --git a/tests/subpkg.test b/tests/subpkg.test index c1f51578e..ca8202a52 100755 --- a/tests/subpkg.test +++ b/tests/subpkg.test @@ -25,10 +25,18 @@ required=gcc set -e +mkdir m4 + +cat >m4/foo.m4 <<'EOF' +AC_DEFUN([FOO],[ + AC_PROG_CC + AC_OUTPUT +]) +EOF + cat >>configure.in <<'END' AC_CONFIG_SUBDIRS([lib]) -AC_PROG_CC -AC_OUTPUT +FOO END cat >Makefile.am <<'EOF' @@ -44,6 +52,8 @@ distdir = subpack-1 dist-hook: test -f $(distdir)/LDADD.c test -f $(top_distdir)/LDADD.c + +ACLOCAL_AMFLAGS = -I m4 EOF cat >LDADD.c <<'EOF' @@ -62,10 +72,9 @@ mkdir lib/src cat >lib/configure.ac <<'EOF' AC_INIT([lib], [2.3]) AM_INIT_AUTOMAKE -AC_PROG_CC AC_PROG_RANLIB AC_CONFIG_FILES([Makefile]) -AC_OUTPUT +FOO EOF cat >lib/Makefile.am <<'EOF' @@ -77,6 +86,8 @@ dist-hook: test -f $(top_distdir)/LDADD.c test -f $(distdir)/src/x.c test ! -f $(top_distdir)/src/x.c + +ACLOCAL_AMFLAGS = -I ../m4 EOF cat >lib/src/x.c <<'EOF' @@ -86,12 +97,13 @@ int lib () } EOF -$ACLOCAL +$ACLOCAL -I m4 $AUTOCONF $AUTOMAKE -Wno-override cd lib -$ACLOCAL +$ACLOCAL -I ../m4 +$FGREP 'm4_include([../m4/foo.m4])' aclocal.m4 $AUTOCONF $AUTOMAKE -Wno-override cd ..