]> sourceware.org Git - automake.git/commitdiff
skip AC_DEFUN lines
authorTom Tromey <tromey@redhat.com>
Tue, 10 Dec 1996 07:58:06 +0000 (07:58 +0000)
committerTom Tromey <tromey@redhat.com>
Tue, 10 Dec 1996 07:58:06 +0000 (07:58 +0000)
ChangeLog
automake.in
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/defun2.test [new file with mode: 0755]

index 8ad83383fce7896404e961395be5b39228375b4a..fc6dd5f95f29c34904fefe95edcc3e2ed443c4e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@ Tue Dec 10 00:41:17 1996  Tom Tromey  <tromey@cygnus.com>
 
        * automake.in (AC_SUBST_PATTERN): Check for alphanumeric variable
        names only.  Test subst.test.
+       (scan_one_configure_file): Skip AC_DEFUN lines.  Test
+       defun2.test.
 
 Mon Dec  9 08:18:42 1996  Tom Tromey  <tromey@cygnus.com>
 
index ccdc9b6ac54ab1d32508eb6ff585e4f8e8230bc1..4ea1879afe6bfdd2023fcc76d9513a9f1cf60a99 100755 (executable)
@@ -3169,6 +3169,11 @@ sub scan_one_configure_file
        s/\bdnl\b.*$//;
        s/\#.*$//;
 
+       # Skip macro definitions.  Otherwise we might be confused into
+       # thinking that a macro that was only defined was actually
+       # used.
+       next if /AC_DEFUN/;
+
        # Populate libobjs array.
        if (/AC_FUNC_ALLOCA/)
        {
index 064dbfe41e415bd220ef4c2465284cd0ee272626..a2dbfc61e293260b9bbb281d5e5e78aebb64783b 100644 (file)
@@ -1,5 +1,6 @@
 Tue Dec 10 00:43:14 1996  Tom Tromey  <tromey@cygnus.com>
 
+       * defun2.test: New file.
        * subst.test: New file.
 
 Sun Dec  8 12:25:22 1996  Tom Tromey  <tromey@cygnus.com>
index aaa6c91a070f2584ba4e40a1e7569b1d5f006cf5..b1a59f360d5b269604a2155fb6a4a461b9afa61f 100644 (file)
@@ -20,7 +20,7 @@ comment2.test vpath.test symlink.test discover.test acinclude.test req.test \
 acsilent.test distdir.test lex2.test libobj4.test libobj5.test version.test \
 ranlib.test confvar.test confvar2.test stdlib.test cxxo.test colon2.test \
 colon3.test remake.test output.test output2.test remake2.test output3.test \
-output4.test colneq2.test subst.test
+output4.test colneq2.test subst.test defun2.test
 
 EXTRA_DIST = defs $(TESTS)
 
index b0c1e219091c28d1127188387110421c3a929bcf..39c38288f9689c6f6d749225ba9fcae81c1c19c9 100644 (file)
@@ -62,7 +62,7 @@ comment2.test vpath.test symlink.test discover.test acinclude.test req.test \
 acsilent.test distdir.test lex2.test libobj4.test libobj5.test version.test \
 ranlib.test confvar.test confvar2.test stdlib.test cxxo.test colon2.test \
 colon3.test remake.test output.test output2.test remake2.test output3.test \
-output4.test colneq2.test subst.test
+output4.test colneq2.test subst.test defun2.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
diff --git a/tests/defun2.test b/tests/defun2.test
new file mode 100755 (executable)
index 0000000..d6869c5
--- /dev/null
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+# Make sure we don't mistake a macro definition for an invocation.
+# From Jim Meyering.
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+dnl if buggy this will require getloadavg.c
+AC_PROG_CC
+AC_DEFUN([AC_FUNC_GETLOADAVG],
+dnl need this to avoid LIBOBJS used but not defined.
+AC_FUNC_MEMCMP
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_LDADD = @LIBOBJS@
+END
+
+: > memcmp.c
+
+$AUTOMAKE
This page took 0.038195 seconds and 5 git commands to generate.