From: Tom Tromey Date: Fri, 13 Feb 1998 05:28:10 +0000 (+0000) Subject: fixed unused.test aclocal bug X-Git-Tag: pre-depend-change~1 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=2a6c5c183cc769671fe3f6aec43a1361d4d98b91;p=automake.git fixed unused.test aclocal bug --- diff --git a/ChangeLog b/ChangeLog index 2cf34d7c..abeef993 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Feb 12 22:27:05 1998 Tom Tromey + + * aclocal.in (scan_m4_files): Reverse-sort keys when constructing + `search' function. From Johan Danielsson. + Tue Sep 16 14:13:15 1997 Paul D. Smith * automake.in: Create new option --generate-deps. This option has diff --git a/aclocal.in b/aclocal.in index 93f88b16..d6b61c35 100644 --- a/aclocal.in +++ b/aclocal.in @@ -274,7 +274,7 @@ sub scan_m4_files # function (instead of just evalling $search in the loop) so that # "die" is correctly and easily propagated if run. local ($search, $expr, $key) = ''; - foreach $key (keys %map) + foreach $key (reverse sort keys %map) { # EXPR is a regexp matching the name of the macro. ($expr = $key) =~ s/(\W)/\\$1/g; diff --git a/tests/ChangeLog b/tests/ChangeLog index 3139e63b..22bfb0a7 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,7 @@ Thu Feb 12 21:00:34 1998 Tom Tromey + * unused.test: New file. + * whoami.test: New file. * alpha.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index c3ccafc4..3680561c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -28,7 +28,7 @@ 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 ammissing.test install.test \ libobj7.test objc.test cond3.test cxxcpp.test aclocal.test alpha.test \ -whoami.test +whoami.test unused.test EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index 7afa3834..5ddf8b74 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -89,7 +89,7 @@ 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 ammissing.test install.test \ libobj7.test objc.test cond3.test cxxcpp.test aclocal.test alpha.test \ -whoami.test +whoami.test unused.test EXTRA_DIST = defs $(TESTS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/tests/unused.test b/tests/unused.test new file mode 100755 index 00000000..18f02da4 --- /dev/null +++ b/tests/unused.test @@ -0,0 +1,19 @@ +#! /bin/sh + +# Test for failing check for unused macros. From Johan Danielsson. +. $srcdir/defs || exit 1 + +cat >> configure.in << 'END' +MACRO_1 +MACRO_1_2 +MACRO_1_2_3 +END + +cat > acinclude.m4 << 'END' +AC_DEFUN(MACRO_1, echo 1) +AC_DEFUN(MACRO_1_2, echo 12) +AC_DEFUN(MACRO_1_2_3, echo 123) +END + +$ACLOCAL 2> output || exit 1 +test -z "`cat output`"