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.
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.
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";
}
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'
dist-hook:
test -f $(distdir)/LDADD.c
test -f $(top_distdir)/LDADD.c
+
+ACLOCAL_AMFLAGS = -I m4
EOF
cat >LDADD.c <<'EOF'
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'
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'
}
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 ..