From: Tom Tromey Date: Tue, 21 Oct 1997 06:52:08 +0000 (+0000) Subject: aclocal fix X-Git-Tag: Release-1-2d~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b5e750197e42441370a2c39aa2d3c7b48d50e051;p=thirdparty%2Fautomake.git aclocal fix --- diff --git a/ChangeLog b/ChangeLog index 68bddc68c..618cc49e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ Tue Oct 21 00:39:44 1997 Tom Tromey + * 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 c235f3989..5a47ebfc0 100644 --- 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. diff --git a/aclocal.in b/aclocal.in index 5b1141568..e14a8a331 100644 --- a/aclocal.in +++ b/aclocal.in @@ -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 $@; } diff --git a/tests/ChangeLog b/tests/ChangeLog index 652931349..e6987659d 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Tue Oct 21 00:46:24 1997 Tom Tromey + + * ammissing.test: New file. + Sun Sep 28 17:19:52 1997 Tom Tromey * cxxnoc.test: Changed to reflect MKDEP change. diff --git a/tests/Makefile.am b/tests/Makefile.am index fde902132..5689d6099 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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) diff --git a/tests/Makefile.in b/tests/Makefile.in index a619269fc..e9edbee69 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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 index 000000000..054204ad1 --- /dev/null +++ b/tests/ammissing.test @@ -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