From: Tom Tromey Date: Tue, 10 Dec 1996 07:58:18 +0000 (+0000) Subject: skip AC_DEFUN lines X-Git-Tag: v1.10.2~3276 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=97980ae919a03151fe99e4d8390592da7f8e54cd;p=platform%2Fupstream%2Fautomake.git skip AC_DEFUN lines --- diff --git a/ChangeLog b/ChangeLog index 8ad8338..fc6dd5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ Tue Dec 10 00:41:17 1996 Tom Tromey * 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 diff --git a/automake.in b/automake.in index ccdc9b6..4ea1879 100755 --- a/automake.in +++ b/automake.in @@ -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/) { diff --git a/tests/ChangeLog b/tests/ChangeLog index 064dbfe..a2dbfc6 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,6 @@ Tue Dec 10 00:43:14 1996 Tom Tromey + * defun2.test: New file. * subst.test: New file. Sun Dec 8 12:25:22 1996 Tom Tromey diff --git a/tests/Makefile.am b/tests/Makefile.am index aaa6c91..b1a59f3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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) diff --git a/tests/Makefile.in b/tests/Makefile.in index b0c1e21..39c3828 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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 index 0000000..d6869c5 --- /dev/null +++ b/tests/defun2.test @@ -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