]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
aclocal fix
authorTom Tromey <tromey@redhat.com>
Tue, 21 Oct 1997 06:52:08 +0000 (06:52 +0000)
committerTom Tromey <tromey@redhat.com>
Tue, 21 Oct 1997 06:52:08 +0000 (06:52 +0000)
ChangeLog
TODO
aclocal.in
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/ammissing.test [new file with mode: 0755]

index 68bddc68cd1b468e738baf2d1f953e517a973bac..618cc49e5247bfe69b5b27792aa9a42e5caa9640 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 Tue Oct 21 00:39:44 1997  Tom Tromey  <tromey@cygnus.com>
 
+       * aclocal.in (scan_m4_files): If macro recognized, &search will
+       return 1.
+       (scan_configure): If AM_ macro not found, give error.
+
        * m4/sanity.m4: If `ls' completely fails, die.  From Jim
        Meyering.
 
diff --git a/TODO b/TODO
index c235f39890cd6dd63157676b3556fbe6167323d4..5a47ebfc03cbfc150d58c5d42aaf7b9a934a5ac6 100644 (file)
--- a/TODO
+++ b/TODO
@@ -80,8 +80,6 @@
 
 * *all* installed scripts should support --version, --help
 
-* have aclocal diagnose unrecognized AM_ macros
-
 For now I guess I'll just have automake give an error if it encounters
 non-C source in a libtool library specification.
 
index 5b11415682df9178114954b796c2fcef407a5e10..e14a8a331f5dc913bb110c2eec9a2fdcec7364c2 100644 (file)
@@ -207,8 +207,13 @@ sub scan_configure
        }
 
        # Search for things we know about.  The "search" sub is
-       # constructed dynamically, above.
-       &search;
+       # constructed dynamically by scan_m4_files.
+       if (! &search && /(AM_[A-Z_]+)/)
+       {
+           # Macro not found, but AM_ prefix found.
+           warn "aclocal: configure.in: $.: macro \`$1' not found in library\n";
+           $exit_status = 1;
+       }
     }
 
     close (CONFIGURE);
@@ -273,8 +278,10 @@ sub scan_m4_files
     {
        # EXPR is a regexp matching the name of the macro.
        ($expr = $key) =~ s/(\W)/\\$1/g;
-       $search .= "&add_macro ('" . $key . "') if /" . $expr . "/;\n";
+       $search .= ("if (/" . $expr "/) { & add_macro (" . $key
+                   . "); return 1; }\n");
     }
+    $search .= "return 0;\n";
     eval 'sub search { ' . $search . '};';
     die "internal error: $@\n search is $search " if $@;
 }
index 6529313498f909763c43c0ce6ae2e7019d3f68c4..e6987659df44be7ef88596598ed7d6aa07cc5b1c 100644 (file)
@@ -1,3 +1,7 @@
+Tue Oct 21 00:46:24 1997  Tom Tromey  <tromey@cygnus.com>
+
+       * ammissing.test: New file.
+
 Sun Sep 28 17:19:52 1997  Tom Tromey  <tromey@cygnus.com>
 
        * cxxnoc.test: Changed to reflect MKDEP change.
index fde902132053a557d94c7374a221cde00e67675e..5689d609962b6208b26020216dec084241636f67 100644 (file)
@@ -26,7 +26,7 @@ remake2.test output3.test output4.test colneq2.test subst.test \
 defun2.test yaccpp.test texinfo3.test texinfo4.test tagsub.test        \
 cxxlibobj.test seenc.test cygwin32.test lisp.test stamph.test \
 ldadd.test version2.test conf2.test cond.test cond2.test xsource.test \
-libobj6.test depend3.test output5.test
+libobj6.test depend3.test output5.test ammissing.test
 
 EXTRA_DIST = defs $(TESTS)
 
index a619269fc98b97a274e781bf741fdd79f8f6d182..e9edbee69a60ce93270b988523db25c62a28eefe 100644 (file)
@@ -87,7 +87,7 @@ remake2.test output3.test output4.test colneq2.test subst.test \
 defun2.test yaccpp.test texinfo3.test texinfo4.test tagsub.test        \
 cxxlibobj.test seenc.test cygwin32.test lisp.test stamph.test \
 ldadd.test version2.test conf2.test cond.test cond2.test xsource.test \
-libobj6.test depend3.test output5.test
+libobj6.test depend3.test output5.test ammissing.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
diff --git a/tests/ammissing.test b/tests/ammissing.test
new file mode 100755 (executable)
index 0000000..054204a
--- /dev/null
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+# Test to see if aclocal correctly reports missing AM_ macro.
+
+. $srcdir/defs || exit 1
+
+echo AM_ZARDOZ >> configure.in
+
+$ACLOCAL && exit 1
+exit 0