This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Have aclocal scan for AC_DEFUN_ONCE
- From: Kelley Cook <kcook at gcc dot gnu dot org>
- To: Automake Mailing List <automake at gnu dot org>
- Date: Tue, 28 Sep 2004 15:01:32 -0400
- Subject: Have aclocal scan for AC_DEFUN_ONCE
- Hop-count: 1
Hi,
In the course of converting various directories within GCC to use
aclocal's nifty new m4_include feature I noticed that aclocal 1.9.2 was
not picking up any of our macros defined with AC_DEFUN_ONCE.
Though my perl regex is on the newbee side, this simple patch seem to
allow for those macros to be also picked up. Please consider it for 1.9.3
Although a testcase was fairly easy to come up with, I do not have a
copyright assignment and didn't want to break the small change guideline.
Kelley Cook
2004-09-28 Kelley Cook <kcook@gcc.gnu.org>
* aclocal.in: Also scan for AC_DEFUN_ONCE.
diff -prud automake-1.9.2/aclocal.in automake-1.9.2a/aclocal.in
--- automake-1.9.2/aclocal.in 2004-08-01 16:02:13.000000000 -0400
+++ automake-1.9.2a/aclocal.in 2004-09-28 14:28:24.333619700 -0400
@@ -101,7 +101,7 @@ $verbose = 0;
# When macroname is `['-quoted , we accept any character in the name,
# except `]'. Otherwise macroname stops on the first `]', `,', `)',
# or `\n' encountered.
-$ac_defun_rx = "A[CU]_DEFUN\\((?:\\[([^]]+)\\]|([^],)\n]+))";
+$ac_defun_rx = "A[CU]_DEFUN(?:_ONCE|)\\((?:\\[([^]]+)\\]|([^],)\n]+))";
# Matches an AC_REQUIRE line.
$ac_require_rx = "AC_REQUIRE\\((?:\\[([^]]+)\\]|([^],)\n]+))\\)";
@@ -427,6 +427,7 @@ sub trace_used_macros ()
$traces .= join (' ', grep { exists $files{$_} } @file_order) . " ";
# All candidate macros.
$traces .= join (' ', map { "--trace='$_:\$f:\$n:\$1'" } ('AC_DEFUN',
+ 'AC_DEFUN_ONCE',
'AU_DEFUN',
keys %macro_seen));
@@ -444,7 +445,9 @@ sub trace_used_macros ()
$traced{$macro} = 1 if $macro_seen{$macro};
$map_traced_defs{$arg1} = $file
- if $macro eq 'AC_DEFUN' || $macro eq 'AU_DEFUN';
+ if $macro eq 'AC_DEFUN' ||
+ $macro eq 'AC_DEFUN_ONCE' ||
+ $macro eq 'AU_DEFUN';
}
$tracefh->close;