]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* aclocal.in (write_aclocal): Consider files with relative
authorAlexandre Duret-Lutz <adl@gnu.org>
Tue, 23 Sep 2003 19:32:58 +0000 (19:32 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Tue, 23 Sep 2003 19:32:58 +0000 (19:32 +0000)
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.

ChangeLog
aclocal.in
tests/subpkg.test

index dca3139e67a439450437aa88d6de0e6df454ac2e..dc112adb0ed0f7910226daee12d6f4f4438f86fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2003-09-23  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       * 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.
index 8a1e612eea3cc186bce2bca01875f91cb5bea68c..3b2dd4d9467c105f8ec2b1fa015e7db9b33ecab1 100644 (file)
@@ -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";
        }
index c1f51578e8d0d321198154c03e7d473c54ea541d..ca8202a52f95f4944b4a7bde90405e512477993e 100755 (executable)
@@ -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 ..