[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: follow include and m4_include
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: follow include and m4_include |
Date: |
Mon, 10 Jun 2002 19:37:44 +0200 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu) |
In bug-gnu-utils@, Akim suggested to replace `sinclude' by
`m4_include'.
However, Automake 1.6.1 does not recognize `include' nor
`m4_include'. Furthermore, that `m4_sinclude' is honored just
happens to be a misbug: the regex used would match anything
ending with `sinclude'.
I'm checking in the following. The first patch is for HEAD
(which doesn't need fixing since it uses --traces), and the
second for branch-1-6.
----------
2002-06-10 Alexandre Duret-Lutz <address@hidden>
* tests/sinclude.test: Check for m4_include too.
Index: tests/sinclude.test
===================================================================
RCS file: /cvs/automake/automake/tests/sinclude.test,v
retrieving revision 1.6
diff -u -r1.6 sinclude.test
--- tests/sinclude.test 10 Jun 2002 10:23:38 -0000 1.6
+++ tests/sinclude.test 10 Jun 2002 17:25:07 -0000
@@ -1,9 +1,11 @@
#! /bin/sh
-# Test to see if `m4_sinclude' works.
+# Test to see if `m4_sinclude' and `m4_include' works.
. $srcdir/defs || exit 1
+set -e
+
# Overwrite configure.in, because the default uses `sinclude' as package
# name and this play havoc with Autoconf on some platforms (`sinclude'
# is an m4 macro).
@@ -18,11 +20,18 @@
AC_SUBST(MAGICALPIG)
END
+cat > sub/h.m4 << 'END'
+AC_SUBST(MAGICALHOG)
+END
+
: > Makefile.am
-$ACLOCAL || exit 1
+$ACLOCAL
+
echo 'm4_sinclude(sub/p.m4)' >> aclocal.m4
+echo 'm4_include(sub/h.m4)' >> aclocal.m4
-$AUTOMAKE --Wno-error || exit 1
+$AUTOMAKE
grep MAGICALPIG Makefile.in
+grep MAGICALHOG Makefile.in
----------
2002-06-10 Alexandre Duret-Lutz <address@hidden>
* tests/sinclude.test: Merge from HEAD.
* automake.in (scan_one_autoconf_file): Prefix the sinclude
regex with \b so we don't match anything ending in `sinclude'.
Regognize m4_include, and include too. Unquote the macro
argument.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1287.2.9
diff -u -r1.1287.2.9 automake.in
--- automake.in 8 Jun 2002 17:23:11 -0000 1.1287.2.9
+++ automake.in 10 Jun 2002 17:35:13 -0000
@@ -4832,13 +4832,13 @@
# Follow includes. This is a weirdness commonly in use at
# Cygnus and hopefully nowhere else.
- if (/sinclude\((.*)\)/ && -f $1)
+ if (/\b(?:m4_)?s?include\((.*)\)/ && -f $1)
{
# $_ being local, if we don't preserve it, when coming
# back we will have $_ undefined, which is bad for the
# the rest of this routine.
my $underscore = $_;
- &scan_one_autoconf_file ($1);
+ &scan_one_autoconf_file (unquote_m4_arg ($1));
$_ = $underscore;
}
Index: tests/sinclude.test
===================================================================
RCS file: /cvs/automake/automake/tests/sinclude.test,v
retrieving revision 1.4
diff -u -r1.4 sinclude.test
--- tests/sinclude.test 21 Oct 2001 18:04:33 -0000 1.4
+++ tests/sinclude.test 10 Jun 2002 17:35:13 -0000
@@ -1,19 +1,37 @@
#! /bin/sh
-# Test to see if `sinclude' works.
+# Test to see if `m4_sinclude' and `m4_include' works.
. $srcdir/defs || exit 1
+set -e
+
+# Overwrite configure.in, because the default uses `sinclude' as package
+# name and this play havoc with Autoconf on some platforms (`sinclude'
+# is an m4 macro).
+cat > configure.in <<EOF
+AC_INIT([amsinclude], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+EOF
+
mkdir sub
cat > sub/p.m4 << 'END'
AC_SUBST(MAGICALPIG)
END
+cat > sub/h.m4 << 'END'
+AC_SUBST(MAGICALHOG)
+END
+
: > Makefile.am
-$ACLOCAL || exit 1
-echo 'sinclude(sub/p.m4)' >> aclocal.m4
+$ACLOCAL
+
+echo 'm4_sinclude(sub/p.m4)' >> aclocal.m4
+echo 'm4_include(sub/h.m4)' >> aclocal.m4
-$AUTOMAKE --Wno-error || exit 1
+$AUTOMAKE
grep MAGICALPIG Makefile.in
+grep MAGICALHOG Makefile.in
--
Alexandre Duret-Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: follow include and m4_include,
Alexandre Duret-Lutz <=