[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
aclocal vs. AU_ALIAS
From: |
Akim Demaille |
Subject: |
aclocal vs. AU_ALIAS |
Date: |
Mon, 03 Jan 2005 17:01:41 +0100 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) |
aclocal does not notice macros defined via AU_ALIAS:
/tmp/dox % cat configure.ac nostromo 16:22
AC_INIT
AC_OLD
/tmp/dox % cat new.m4 nostromo 16:40
AU_ALIAS([AC_OLD], [NEW])
/tmp/dox % aclocal -I . --verbose |& grep -E 'NEW|OLD' nostromo 16:40
/tmp/dox % cat aclocal.m4 nostromo Err 1
cat: aclocal.m4: No such file or directory
How about this?
Index: ChangeLog
from Akim Demaille <address@hidden>
* aclocal.in ($ac_defun_rx): Match AU_ALIAS.
* tests/aclocal5.test (MORE_DEFS): Rename as...
(AM_TEST_SUBST): this so that undefined macros are caught.
And make it an alias of AC_SUBST.
Test AU_ALIAS.
Reported by Martin Bravenboer.
Index: aclocal.in
===================================================================
RCS file: /cvs/automake/automake/aclocal.in,v
retrieving revision 1.121
diff -u -u -r1.121 aclocal.in
--- aclocal.in 1 Jan 2005 12:28:44 -0000 1.121
+++ aclocal.in 3 Jan 2005 16:01:33 -0000
@@ -106,7 +106,7 @@
# except `]'. Otherwise macroname stops on the first `]', `,', `)',
# or `\n' encountered.
my $ac_defun_rx =
- "(?:A[CU]_DEFUN|AC_DEFUN_ONCE)\\((?:\\[([^]]+)\\]|([^],)\n]+))";
+ "(?:A[CU]_DEFUN|AU_ALIAS|AC_DEFUN_ONCE)\\((?:\\[([^]]+)\\]|([^],)\n]+))";
# Matches an AC_REQUIRE line.
my $ac_require_rx = "AC_REQUIRE\\((?:\\[([^]]+)\\]|([^],)\n]+))\\)";
Index: tests/aclocal5.test
===================================================================
RCS file: /cvs/automake/automake/tests/aclocal5.test,v
retrieving revision 1.3
diff -u -u -r1.3 aclocal5.test
--- tests/aclocal5.test 10 Oct 2004 17:03:45 -0000 1.3
+++ tests/aclocal5.test 3 Jan 2005 16:01:33 -0000
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -29,7 +29,7 @@
set -e
cat >> configure.in << 'END'
-MORE_DEFS
+AM_TEST_SUBST([GREPME])
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
END
@@ -43,7 +43,7 @@
: > sub/Makefile.am
mkdir m4
-echo 'AC_DEFUN([MORE_DEFS], [])' > m4/moredefs.m4
+echo 'AC_DEFUN([AM_TEST_SUBST], [AC_SUBST($@)])' > m4/moredefs.m4
$ACLOCAL -I m4
$AUTOCONF
@@ -53,7 +53,7 @@
# Update an aclocal.m4 dependency, then make sure all Makefiles
# are updated, even from a sub-directory.
-echo 'AC_DEFUN_ONCE([MORE_DEFS], [AC_SUBST([GREPME])])' > m4/moredefs.m4
+echo 'AC_DEFUN_ONCE([AM_TEST_SUBST], [AC_SUBST($@)])' > m4/moredefs.m4
cd sub
$MAKE
cd ..
@@ -63,3 +63,11 @@
# Make sure configure dependencies are distributed.
$MAKE distdir
test -f aclocal5-1.0/m4/moredefs.m4
+
+# Make sure AU_ALIAS is recognized.
+echo 'AU_ALIAS([AM_TEST_SUBST], [AC_SUBST])' > m4/moredefs.m4
+cd sub
+$MAKE
+cd ..
+grep 'm4/moredefs\.m4' aclocal.m4
+grep '@GREPME@' configure
- aclocal vs. AU_ALIAS,
Akim Demaille <=