]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* Makefile.am (maintainer-clean): Disallow '$AUTOMAKE && exit 1'.
authorAlexandre Duret-Lutz <adl@gnu.org>
Thu, 3 Jul 2003 18:58:50 +0000 (18:58 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Thu, 3 Jul 2003 18:58:50 +0000 (18:58 +0000)
Ignore @...@ substitutions in comments.
* tests/defs.in: Try to make the shell more POSIX compliant.
(AUTOMAKE_run, AUTOMAKE_fails): New functions.
* tests/README: Mention AUTOMAKE_fails.
* tests/alloca.test, tests/alloca2.test, tests/ansi8.test,
* tests/asm.test, tests/backsl3.test, tests/backsl4.test,
* tests/badline.test, tests/badopt.test, tests/canon.test,
* tests/canon5.test, tests/colneq.test, tests/comment3.test,
* tests/comment5.test, tests/cond2.test, tests/cond20.test,
* tests/cond23.test, tests/cond24.test, tests/cond27.test,
* tests/condinc2.test, tests/conff2.test, tests/cxx2.test,
* tests/dejagnu2.test, tests/dirforbid.test,
* tests/distcom3.test, tests/else.test, tests/exdir2.test,
* tests/exeext2.test, tests/gcj2.test, tests/gcj5.test,
* tests/getopt.test, tests/gettext.test, tests/gettext2.test,
* tests/gnits.test, tests/gnuwarn.test, tests/gnuwarn2.test,
* tests/insh.test, tests/lex2.test, tests/libobj10.test,
* tests/libobj12.test, tests/libobj13.test,
* tests/libobj3.test, tests/library2.test,
* tests/library3.test, tests/libtool4.test,
* tests/libtool6.test, tests/lisp2.test, tests/location.test,
* tests/nogzip2.test, tests/output5.test, tests/overrid.test,
* tests/percent.test, tests/percent2.test,
* tests/pluseq5.test, tests/pluseq7.test, tests/pluseq9.test,
* tests/pr211.test, tests/primary.test, tests/primary2.test,
* tests/python2.test, tests/recurs.test, tests/reqd2.test,
* tests/seenc.test, tests/specflg.test, tests/specflg2.test,
* tests/spell.test, tests/spell2.test, tests/srcsub.test,
* tests/srcsub2.test, tests/stdlib.test, tests/subdir7.test,
* tests/substtarg.test, tests/suffix11.test,
* tests/symlink.test, tests/syntax.test,
* tests/targetclash.test, tests/txinfo4.test,
* tests/version3.test, tests/warnopts.test,
* tests/xsource.test, tests/yacc2.test: Use set -e,
AUTOMAKE_fails, and always grep error message.

85 files changed:
ChangeLog
Makefile.am
Makefile.in
tests/README
tests/alloca.test
tests/alloca2.test
tests/ansi8.test
tests/asm.test
tests/backsl3.test
tests/backsl4.test
tests/badline.test
tests/badopt.test
tests/canon.test
tests/canon5.test
tests/colneq.test
tests/comment3.test
tests/comment5.test
tests/cond2.test
tests/cond20.test
tests/cond23.test
tests/cond24.test
tests/cond27.test
tests/condinc2.test
tests/conff2.test
tests/cxx2.test
tests/defs.in
tests/dejagnu2.test
tests/dirforbid.test
tests/distcom3.test
tests/else.test
tests/exdir2.test
tests/exeext2.test
tests/gcj2.test
tests/gcj5.test
tests/getopt.test
tests/gettext.test
tests/gettext2.test
tests/gnits.test
tests/gnuwarn.test
tests/gnuwarn2.test
tests/insh.test
tests/lex2.test
tests/libobj10.test
tests/libobj12.test
tests/libobj13.test
tests/libobj3.test
tests/library2.test
tests/library3.test
tests/libtool4.test
tests/libtool6.test
tests/lisp2.test
tests/location.test
tests/nogzip2.test
tests/output5.test
tests/overrid.test
tests/percent.test
tests/percent2.test
tests/pluseq5.test
tests/pluseq7.test
tests/pluseq9.test
tests/pr211.test
tests/primary.test
tests/primary2.test
tests/python2.test
tests/recurs.test
tests/reqd2.test
tests/seenc.test
tests/specflg.test
tests/specflg2.test
tests/spell.test
tests/spell2.test
tests/srcsub.test
tests/srcsub2.test
tests/stdlib.test
tests/subdir7.test
tests/substtarg.test
tests/suffix11.test
tests/symlink.test
tests/syntax.test
tests/targetclash.test
tests/txinfo4.test
tests/version3.test
tests/warnopts.test
tests/xsource.test
tests/yacc2.test

index ee33b2aa7e910be8881b55a29dcc6505c65ecb12..f7f9ee54d62cd7cb7a30b640a0ddccb408268d0e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,42 @@
 2003-07-03  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       * Makefile.am (maintainer-clean): Disallow '$AUTOMAKE && exit 1'.
+       Ignore @...@ substitutions in comments.
+       * tests/defs.in: Try to make the shell more POSIX compliant.
+       (AUTOMAKE_run, AUTOMAKE_fails): New functions.
+       * tests/README: Mention AUTOMAKE_fails.
+       * tests/alloca.test, tests/alloca2.test, tests/ansi8.test,
+       * tests/asm.test, tests/backsl3.test, tests/backsl4.test,
+       * tests/badline.test, tests/badopt.test, tests/canon.test,
+       * tests/canon5.test, tests/colneq.test, tests/comment3.test,
+       * tests/comment5.test, tests/cond2.test, tests/cond20.test,
+       * tests/cond23.test, tests/cond24.test, tests/cond27.test,
+       * tests/condinc2.test, tests/conff2.test, tests/cxx2.test,
+       * tests/dejagnu2.test, tests/dirforbid.test,
+       * tests/distcom3.test, tests/else.test, tests/exdir2.test,
+       * tests/exeext2.test, tests/gcj2.test, tests/gcj5.test,
+       * tests/getopt.test, tests/gettext.test, tests/gettext2.test,
+       * tests/gnits.test, tests/gnuwarn.test, tests/gnuwarn2.test,
+       * tests/insh.test, tests/lex2.test, tests/libobj10.test,
+       * tests/libobj12.test, tests/libobj13.test,
+       * tests/libobj3.test, tests/library2.test,
+       * tests/library3.test, tests/libtool4.test,
+       * tests/libtool6.test, tests/lisp2.test, tests/location.test,
+       * tests/nogzip2.test, tests/output5.test, tests/overrid.test,
+       * tests/percent.test, tests/percent2.test,
+       * tests/pluseq5.test, tests/pluseq7.test, tests/pluseq9.test,
+       * tests/pr211.test, tests/primary.test, tests/primary2.test,
+       * tests/python2.test, tests/recurs.test, tests/reqd2.test,
+       * tests/seenc.test, tests/specflg.test, tests/specflg2.test,
+       * tests/spell.test, tests/spell2.test, tests/srcsub.test,
+       * tests/srcsub2.test, tests/stdlib.test, tests/subdir7.test,
+       * tests/substtarg.test, tests/suffix11.test,
+       * tests/symlink.test, tests/syntax.test,
+       * tests/targetclash.test, tests/txinfo4.test,
+       * tests/version3.test, tests/warnopts.test,
+       * tests/xsource.test, tests/yacc2.test: Use set -e,
+       AUTOMAKE_fails, and always grep error message.
+
        * automake.in (handle_ltlibraries): Fix call to msg.
 
        * tests/stamph.test: Delete.
index cfad0e491fb25c68d658f4dcb614f32cfa8caa70..aad258fffeab938e5c0ba722487214bd2a51a3d9 100644 (file)
@@ -190,6 +190,11 @@ maintainer-check: automake aclocal
          echo 'Do not run "automake" in the above tests.  Use "$$AUTOMAKE" instead.' 1>&2;  \
          exit 1; \
        fi
+## Use AUTOMAKE_fails when appropriate
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep '\$$AUTOMAKE.*&&.*exit'; then \
+         echo 'Use AUTOMAKE_fails + grep to catch automake failures in the above tests.' 1>&2;  \
+         exit 1; \
+       fi
 ## Tests should never call aclocal directly.
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*aclocal'; then \
          echo 'Do not run "aclocal" in the above tests.  Use "$$ACLOCAL" instead.' 1>&2;  \
@@ -236,12 +241,11 @@ maintainer-check: automake aclocal
        fi
 ## Try to make sure all @...@ substitutions are covered by our
 ## substitution rule.
-       @if test `grep -E '@[A-Za-z_0-9]+@' aclocal | wc -l` -ne 0; then \
+       @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' aclocal | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in aclocal" 1>&2; \
          exit 1; \
        fi
-## In automake there are a few valid ones.
-       @if test `grep -E '@[A-Za-z_0-9]+@' automake | wc -l` -ne 5; then \
+       @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' automake | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in automake" 1>&2; \
          exit 1; \
        fi
index 957bcb9ea84765dd7536cd8ce86ab919f5b0feaf..2a0f7570022d63dfa70819b0a8415424afdb1a8f 100644 (file)
@@ -584,7 +584,7 @@ distcheck: dist
          && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
        $(am__remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
-         for i in $(DIST_ARCHIVES); do echo $$i; done) | \
+         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
          sed -e '1{h;s/./=/g;p;x}' -e '$${p;x}'
 distuninstallcheck:
        @cd $(distuninstallcheck_dir) \
@@ -696,7 +696,7 @@ installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -rf autom4te.cache
+       -rm -rf $(top_srcdir)/autom4te.cache
 maintainer-clean-am: distclean-am maintainer-clean-aminfo \
        maintainer-clean-generic maintainer-clean-vti
 
@@ -847,6 +847,10 @@ maintainer-check: automake aclocal
          echo 'Do not run "automake" in the above tests.  Use "$$AUTOMAKE" instead.' 1>&2;  \
          exit 1; \
        fi
+       @if grep -v '^#' $(srcdir)/tests/*.test | grep '\$$AUTOMAKE.*&&.*exit'; then \
+         echo 'Use AUTOMAKE_fails + grep to catch automake failures in the above tests.' 1>&2;  \
+         exit 1; \
+       fi
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*aclocal'; then \
          echo 'Do not run "aclocal" in the above tests.  Use "$$ACLOCAL" instead.' 1>&2;  \
          exit 1; \
@@ -882,11 +886,11 @@ maintainer-check: automake aclocal
          echo 'Do not use egrep or fgrep in the above files, they are not portable.' 1>&2; \
          exit 1; \
        fi
-       @if test `grep -E '@[A-Za-z_0-9]+@' aclocal | wc -l` -ne 0; then \
+       @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' aclocal | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in aclocal" 1>&2; \
          exit 1; \
        fi
-       @if test `grep -E '@[A-Za-z_0-9]+@' automake | wc -l` -ne 5; then \
+       @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' automake | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in automake" 1>&2; \
          exit 1; \
        fi
index 1f06b29bf356af09fdb47f65c49c38d60cb15c28..5aa328bc39968413d77134b7cfc9bd01e47fde6f 100644 (file)
@@ -111,8 +111,7 @@ Do not
   Do not test an Automake error with `$AUTOMAKE && exit 1', or in three
   years we'll discover that this test failed for some other bogus reason.
   This happened many times.  Better use something like
-     $AUTOMAKE 2>stderr && exit 1
-     cat stderr
+     AUTOMAKE_fails
      grep 'expected diagnostic' stderr
   (Note this doesn't prevent the test from failing for another
   reason, but at least it makes sure the original error is still
index 15811f395eb883304bcbe9a707bc074d6dd8f746..d2a10d8163ecd991aca89c7bd89859340b50844c 100755 (executable)
@@ -31,7 +31,6 @@ libtu_a_LIBADD = @ALLOCA@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'Makefile.am:1:.*AC_PROG_RANLIB' stderr
 grep 'Makefile.am:3:.*AC_FUNC_ALLOCA' stderr
index 36db4af04009ce915839b0d7d14182b13241ff0d..d91fed969524356cd7105f7023742f1f7f4658c5 100755 (executable)
@@ -31,7 +31,6 @@ libtu_la_LIBADD = @LTALLOCA@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'Makefile.am:1:.*AC_PROG_LIBTOOL' stderr
 grep 'Makefile.am:3:.*ALLOCA' stderr
index c4ce8e2737bbd983dc5b8bc55ef4951f25c7781a..d05119dff91b7c72e0a89d2cdefd7fdadb1ed2c6 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -30,6 +30,5 @@ bin_PROGRAMS = hello
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep AM_C_PROTOTYPES stderr
index 6802fc28bead9620bf250acdc09be87a5554d12f..e4a7f8af08ec278c48e41888d74623016d34fffb 100755 (executable)
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -41,8 +41,7 @@ AC_OUTPUT(Makefile)
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AM_PROG_AS stderr
 
 # On fast machines the autom4te.cache created during the above run of
@@ -64,8 +63,7 @@ AC_OUTPUT(Makefile)
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep CCAS stderr
 grep AM_PROG_AS stderr
 
@@ -83,8 +81,7 @@ AC_OUTPUT(Makefile)
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep CCASFLAGS stderr
 grep AM_PROG_AS stderr
 
index bb465e49e01d86331109802b251cf17e3e2da981..1448d2e6856aa9d8d5c92c6cebeb9891ac43882c 100755 (executable)
@@ -30,6 +30,6 @@ foo = \
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
+AUTOMAKE_fails
 cat stderr
 grep 'trailing backslash' stderr
index a5932495240ffa270fe0a4902aaabb4e91132e73..bb20b4e35b64de37a3d487991f81958dd3b8e774 100755 (executable)
@@ -42,8 +42,7 @@ echo '        fum' >>Makefile.am
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep ':1:.*whitespace' stderr
 grep ':5:.*whitespace' stderr
 ./configure
index 5fb113edeb0ef8ef7005706ad39b1e9542c43565..2325f3e593d25d54556ff4feb6e178fcd5bac0a3 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
 
 . ./defs || exit 1
 
-cat >> configure.in << 'END'
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
 AC_SUBST(TEXINFOS)
+AC_CONFIG_FILES([Makefile])
 END
 
 : > Makefile.am
 
 $ACLOCAL || exit 1
-$AUTOMAKE > out 2>&1 && exit 1
-grep Makefile out && exit 1
-exit 0
+AUTOMAKE_fails
+grep 'configure.in:3:.*info_TEXINFOS' stderr
index 748d3d6f805497de734f6c61ba32b65c158c3ae5..9837b3ffa24aa41c01950705b8307ed0975c0296 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -26,5 +26,6 @@ cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = zardoz
 END
 
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep zardoz stderr
index 79971446f9ac76143fe942abebfde720a6b6304d..42fc107a5dfc897ccc23863d769cbf218c818e7e 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 echo AC_PROG_CC >> configure.in
 
 cat > Makefile.am << 'END'
@@ -29,6 +31,6 @@ bin_PROGRAMS = sniff-glue
 sniff-glue_SOURCES = sg.c
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:2:.*sniff_glue_SOURCES' stderr
index 66e6519f35681d1eb0fa80ba27b5f10d4f3e290d..6db9f360f332e3bf1e156c9602ae4277006900ee 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
 # Boston, MA 02111-1307, USA.
 
 # Test to make sure that we allow variable names starting in
-# non-letters.
+# non-letters.  Whatever that might mean.
 
 . ./defs || exit 1
 
+set -e
+
 echo AC_PROG_CC >> configure.in
 
 cat > Makefile.am << 'END'
@@ -30,7 +32,7 @@ bin_PROGRAMS = 123test
 123test_SOURCES = 123.c
 END
 
-$ACLOCAL || exit 1
+$ACLOCAL
 $AUTOMAKE || exit 1
 
 cat > Makefile.am << 'END'
@@ -39,20 +41,21 @@ _foo_SOURCES = foo.c
 END
 
 # Variables starting with `_' are not portable.
-$AUTOMAKE -Wno-portability || exit 1
+$AUTOMAKE -Wno-portability
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = ,foo
 ,foo_SOURCES = foo.c
 END
 
-# Variables starting with `_' are not portable.
-$AUTOMAKE -Wno-portability && exit 1
+# Variables starting with `,' are not portable.
+AUTOMAKE_fails -Wno-portability
+grep 'Makefile.am:2:.*_foo_SOURCES' stderr
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = ,foo
 _foo_SOURCES = foo.c
 END
 
-# Variables starting with `_' are not portable.
+# Variables starting with `_' or `,' are not portable.
 $AUTOMAKE -Wno-portability
index cf4aea9c0eab465cda4ef487aa2dff6ed369e484..908fba25cfbe1113dea53cd014c901282e8624e6 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -30,8 +30,7 @@ data_DATA = $(ICONS)
 END
 
 $ACLOCAL
-$AUTOMAKE 2> stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep ':=.*not portable' stderr
 
 echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am
index 541697f6b25c580daf53d5c24582158d852dffec..fd36e16365fb6ee3bea5babd6409ed68989ca834 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 install-data-local:
        # Tru64 Unix must die
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:2:.*#' stderr
index a81559dfe589065cf9faf39cbfbbb1164bf8249e..f4d523e8ede64cf8494ad35c6644a215f2528f9b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -40,8 +40,7 @@ var = foo
 EOF
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep '^Makefile.am:5: blank line following trailing backslash' stderr
 
 
@@ -58,8 +57,7 @@ all-local:
 var = foo
 EOF
 
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep '^Makefile.am:2: blank line following trailing backslash' stderr
 
 
@@ -71,8 +69,7 @@ cat > Makefile.inc << 'EOF'
 
 EOF
 
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep '^Makefile.inc:2: blank line following trailing backslash' stderr
 grep '^Makefile.am:1: .*included from here' stderr
 
index bbc672f792265287f837bf41bebe8e5352eebb2c..68d5ca1d2cd4f8d13846f2e3a3ba724b13165dd4 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
@@ -40,6 +42,6 @@ END
 
 mkdir dir1
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'dir2.*does not exist' stderr
index c550c48d9421948a418006edf77b670181682a05..e56fbea0550365d700ad4cbdb5e11cf01acd04d2 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -50,5 +50,5 @@ set -e
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a && exit 1
-$AUTOMAKE -a 2>&1| grep "recursively defined"
+AUTOMAKE_fails -a
+grep "recursively defined" stderr
index 0442a8e45a3969617d7b2dbc5e1aa343b00ef5d3..c6fe42dce805c99a93a315c74b0660643f05350b 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -37,5 +37,5 @@ endif
 EOF
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
+AUTOMAKE_fails
 grep 'libdir was already defined' stderr
index 4260340e6be8a47a4cf0c30d045df5074e02bbe5..11b6eb542f1bd1896e80b8d65a53d9c0c7451f68 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -38,5 +38,5 @@ endif
 EOF
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
+AUTOMAKE_fails
 grep 'foo was already defined' stderr
index 9b7410639a743594ef035c5e595ab36ade5f49b0..aa6741e9995be9a8170251a9d1137ae5ff7f4828 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -37,7 +37,6 @@ my_DATA = foo
 EOF
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep ' USE_FOO' stderr && exit 1
 grep '!USE_FOO' stderr
index 0f8fbe748f981bfda545801855ed217358450787..ae808efd8bb0918c6cf9ae00d0a2ff528941a5f0 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AM_CONDITIONAL(TOBE, false)
 END
@@ -38,6 +40,6 @@ target: dependency
 endif
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'adjunct:3: too many conditionals closed' stderr
index 3808da715fb82492f7a9aff63092937259bc9146..8e3e01c2ece11e533380d274afbd134a7a3cb896 100755 (executable)
@@ -33,7 +33,6 @@ AC_OUTPUT
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'configure.in:3:.*AC_CONFIG_FILES' stderr
 grep 'configure.in:4:.*AC_CONFIG_HEADERS' stderr
index 5afaa0c2a8a93ebd0722675c76a344509e8c0a7f..3b020c5cf66df877823d365c4785546c2a9580e0 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -32,6 +32,5 @@ hello_SOURCES = hello.cpp
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AC_PROG_CXX stderr
index 1d0735a1042fdc8f2d64d56db39b467a9dc0cc6e..ca310420c318c899a89f633b54386b52b9e0beb1 100644 (file)
 # Defines for Automake testing environment.
 # Tom Tromey <tromey@cygnus.com>
 
+# Be Bourne compatible.
+# (Snippet copied from configure's initialization in Autoconf 2.57.)
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
 # Ensure we are running from the right directory.
 test -f ./defs || {
    echo "defs: not found in current directory" 1>&2
@@ -297,6 +309,30 @@ sleep='sleep @MODIFICATION_DELAY@'
 testsrcdir=$srcdir
 unset srcdir
 
+# AUTOMAKE_run status [options...]
+# --------------------------------
+# Run Automake with OPTIONS, and fail if automake
+# does not exit with STATUS.
+AUTOMAKE_run ()
+{
+  expected_exitcode=$1
+  shift
+  exitcode=0
+  $AUTOMAKE ${1+"$@"} 2>stderr >stdout || exitcode=$?
+  cat stderr
+  cat stdout
+  test $exitcode = $expected_exitcode || exit 1
+}
+
+# AUTOMAKE_fails [options...]
+# ---------------------------
+# Run Automake with OPTIONS, and fail if automake
+# does not exit with STATUS.
+AUTOMAKE_fails ()
+{
+  AUTOMAKE_run 1 ${1+"$@"}
+}
+
 # Turn on shell traces when VERBOSE=x.
 if test "x$VERBOSE" = xx; then
   set -x
index c6142b65365a7286993b5dfd23e3dcfeb72388b8..7cca82ce4ac05f37e1198c4172018c74c8beed40 100755 (executable)
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -45,6 +45,5 @@ $MAKE site.exp >stdout
 cat stdout
 grep foo stdout
 
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'Makefile.am:3:.*site.exp' stderr
index f112a1c77e34fbd9b0206ad07fecb2a48470274b..9cc404917d66063491199237746d3cfed37bfb1b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -36,7 +36,7 @@ for i in data_PROGRAMS lib_HEADERS ; do
 $i = foo
 END
   $ACLOCAL
-  # This strange syntax works around NetBSD Problem Report #11542.
-  $AUTOMAKE -a && exit 1 || :
+  AUTOMAKE_fails -a
+  grep 'Makefile.am:1:.*directory' stderr
 done
 :
index e92ccfa3618e049c80b5f04e10cad55806366f24..40880fc38b458f8bff58910fd605382dcd597819 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -54,6 +54,5 @@ sed -n -e '/^DIST_COMMON =.*\\$/ {
 
 # Should warn about missing README.
 : > Makefile.am
-$AUTOMAKE --add-missing --gnu 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing --gnu
 grep README stderr
index 04bbdd531bb4b9a385a24cc1e62416c1d2f944f4..7510eb031386a6a663bcc3fa870e35fe82ebe7c5 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 echo 'AM_CONDITIONAL(FOO, true)' >> configure.in
 
 cat > Makefile.am << 'END'
@@ -30,12 +32,12 @@ APACHE_DIR_IS_SRC = @APACHE_DIR_IS_SRC@
 
 # we only need to descend into the c dir if we're doing a 1.3 DSO configuration
 ifeq ("${APACHE_DIR_IS_SRC}","yes")
-SUBDIRS = java 
+SUBDIRS = java
 else
 SUBDIRS = c java
 endif
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE > out 2>&1 && exit 1
-grep :7: out
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:7:.*else without if' stderr
index d5d0c7e4bf0061966d5e24c0fc717c3f59d07f39..1f21ef2fc656b6ea3bc01c586ee0c4c16aedf1cd 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'EOF'
 html_DATA = zot.html
 pkgdata_DATA = qbert
 EOF
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'pkgdatadir' stderr && exit 1
+grep 'Makefile.am:1:.*htmldir.*undefined' stderr
index 6402a5774fdb85a3a9e7e41f745dbf95d094db0e..f216351e166ca8f5b99fb5efe8f23143fe815efa 100755 (executable)
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -39,11 +39,9 @@ END
 $ACLOCAL
 
 $AUTOMAKE -Wnone
-$AUTOMAKE -Wnone -Wobsolete 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -Wnone -Wobsolete
 grep 'deprecated.*maude' stderr
-$AUTOMAKE -Wall 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -Wall
 grep 'deprecated.*maude' stderr
 grep 'overrid.*maude' stderr
 
index 1a8eb1a16e3a0e7f716f9d14450c98e27f6688d0..33b43c4f0b3ea57e14e3311a5d6a624f43c69e4b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 _AM_DEPENDENCIES(GCJ)
 AC_SUBST(GCJ)
@@ -32,6 +34,6 @@ bin_PROGRAMS = convert
 convert_SOURCES = x/../convert.java
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:.*\.\.' stderr
index a84db785b5561957640b4629856620987a959ac4..87d465b83c9735b8bc8d3a5e80590772c0c070b0 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -34,6 +34,5 @@ convert_SOURCES = convert.java
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AM_PROG_GCJ stderr
index 2e96d938937b34a2a1daccfbae35e4e393716552..cceb43ee4bde0edc835f999a016b05d712e12885 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
 set -e
 
 # This is expected to fail ...
-$AUTOMAKE -Wnonexistant 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -Wnonexistant
 grep ':.*nonexistant' stderr
 
 # ... but this should not.
-$AUTOMAKE -Wnonexistant --help 2>stderr
-cat stderr
+AUTOMAKE_run 0 -Wnonexistant --help
 grep ':.*nonexistant' stderr && exit 1
 
 
 # Similarly, this should fail ...
-$AUTOMAKE --nonexistant 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --nonexistant 2>stderr
 grep ':.*nonexistant' stderr
 
 # ... but this should not.
-$AUTOMAKE --nonexistant --help 2>stderr
-cat stderr
+AUTOMAKE_run 0 --nonexistant --help
 grep ':.*nonexistant' stderr && exit 1
 
 :
index a4d2e68609b6da0f2051f510a0a59eb678ae6a6b..ef9d37f8c6aa1b444eea711c29c078fa20717a21 100755 (executable)
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -37,18 +37,15 @@ $ACLOCAL
 
 # po/ and intl/ are required
 
-$AUTOMAKE --add-missing 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing
 grep 'AM_GNU_GETTEXT.*SUBDIRS' stderr
 
 echo 'SUBDIRS = po' >Makefile.am
-$AUTOMAKE --add-missing 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing
 grep 'AM_GNU_GETTEXT.*intl' stderr
 
 echo 'SUBDIRS = intl' >Makefile.am
-$AUTOMAKE --add-missing 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing
 grep 'AM_GNU_GETTEXT.*po' stderr
 
 # Ok.
@@ -70,6 +67,5 @@ $AUTOMAKE
 # Still, SUBDIRS must be defined.
 
 : >Makefile.am
-$AUTOMAKE --add-missing 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing
 grep 'AM_GNU_GETTEXT.*SUBDIRS' stderr
index f72da9e21603e2398584f5056c347ed44015141a..b572f768c1cda314c4e15a9f8dcf5c968720c49f 100755 (executable)
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -38,13 +38,11 @@ $ACLOCAL
 
 # po/ is required, but intl/ isn't.
 
-$AUTOMAKE --add-missing 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing
 grep 'AM_GNU_GETTEXT.*SUBDIRS' stderr
 
 echo 'SUBDIRS = foo' >Makefile.am
-$AUTOMAKE --add-missing 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing
 grep 'AM_GNU_GETTEXT.*po' stderr
 
 # Ok.
@@ -61,6 +59,5 @@ grep 'with-included-gettext' Makefile.in && exit 1
 
 mkdir intl
 echo 'SUBDIRS = po intl' >Makefile.am
-$AUTOMAKE --add-missing 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing
 grep 'intl.*AM_GNU_GETTEXT' stderr
index c48f4e1b414a2c18ba71fef727e47fa26ef98f9b..f5567610c651b72657059942fc4d5a320c190e75 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
 
 . ./defs || exit 1
 
-cat > configure.in << 'END'
-PACKAGE=nonesuch
-VERSION=3.5.3.2
-AC_OUTPUT(Makefile)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [3.5.3.2])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES(Makefile)
 END
 
 cat > Makefile.am << 'END'
@@ -41,6 +43,6 @@ END
 : > ChangeLog
 : > THANKS
 
-$ACLOCAL || exit 1
-$AUTOMAKE --gnits && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails --gnits
+grep 'configure.in:.*3\.5\.3\.2' stderr
index 9dca3b177eaddc7f477385d6a2be3e5f67976b48..4c7bfdf8a8915499591cd85b4b24f5c9f936c002 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -46,8 +46,7 @@ $ACLOCAL
 # Don't warn in foreign mode
 $AUTOMAKE -Wnone --add-missing --foreign
 # Warn in gnu mode
-$AUTOMAKE -Wnone  --add-missing --gnu 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -Wnone --add-missing --gnu
 grep 'Makefile.am:1:.*CFLAGS' stderr
 grep 'Makefile.am:2:.*LDFLAGS' stderr
 # No reason to warn about CXXFLAGS since it's not used.
index bf3753b8ef655c714584a50a0b30695f8910fee2..cf352d6351c9ceef19e5f9b38b0171a974d0fdcc 100755 (executable)
@@ -44,6 +44,5 @@ AUTOMAKE_OPTIONS = gnu
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'configure.in:2:.*no-installman' stderr
index b4c0e7f0035e946f760d4afc6d435aeca3921d3f..a8e82ef893b3af4126769d8f60f8eb8ed0150c43 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
 
 . ./defs || exit 1
 
+set -e
+
 rm -f mkinstalldirs
 
 : > Makefile.am
 
-$ACLOCAL || exit 1
-$AUTOMAKE > out 2>&1 && exit 1
-
-grep mkinstalldirs out
+$ACLOCAL
+AUTOMAKE_fails
+grep 'required.*mkinstalldirs' stderr
index 01e9c061bdf6bce9e0fd6779ac2d1ae16935662e..d715b33873105a3f4728b6755a6698f0d8d22695 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -36,6 +36,5 @@ END
 : > joe.l
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AM_PROG_LEX stderr
index 8dd3ca7b4a7519460b5c84cc3fe551a4e9f4d4ed..0343514336fe8f9fb4cba975dde67ec5c5c9daef 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -23,6 +23,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_RANLIB
@@ -35,9 +37,10 @@ noinst_LIBRARIES = libfoo.a
 libfoo_a_LIBADD = @LIBOBJS@
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:2:.*foo\.c' stderr
 
 echo 'BUILT_SOURCES = foo.c' >> Makefile.am
 
-$AUTOMAKE || exit 1
+$AUTOMAKE
index e8237e482479115c27b6e7a5171d4fdc3a1e9bf6..c3de96dd987d6b9272fce3f63cd9c3ae5bd43794 100755 (executable)
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -57,8 +57,7 @@ $AUTOMAKE
 # This however should be diagnosed, since foo.c and bar.c are in @LIBOBJS@.
 echo 'libfoo_a_SOURCES += foo.c' >> Makefile.am
 echo 'p1_SOURCES += bar.c' >> Makefile.am
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 $FGREP foo.c stderr
 $FGREP bar.c stderr
 
@@ -70,6 +69,5 @@ END
 $AUTOMAKE
 grep 'a_DEPENDENCIES.*LIBOBJS' Makefile.in
 echo 'a_SOURCES = foo.c' >> Makefile.am
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 $FGREP foo.c stderr
index 528fec9f1031837bafd0ec895e57ee2bfab62908..70b9c845a46acf4d3dd139b641d91f53a1b12da4 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -50,6 +50,5 @@ $AUTOMAKE --add-missing
 
 # This however should be diagnosed, since foo.c is in @LIBOBJS@.
 echo 'libfoo_la_SOURCES += foo.c' >> Makefile.am
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 $FGREP foo.c stderr
index 8e1331c506eb5ad719b29a0402cf1947d8f0eac1..58c24af8f581efabb2f4e76ed8a8a2a424cc6150 100755 (executable)
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -35,6 +35,5 @@ libtu_a_LIBADD = @LIBOBJS@
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'Makefile.am:3:.*LIBOBJS' stderr
index 03fb0171d6ff7549d8ba75dacf944e7721960d06..316d17463ba2f1692ff84452c12d0be168b45dea 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -29,6 +29,5 @@ EXTRA_LIBRARIES = libfoo.a
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AC_PROG_RANLIB stderr
index d07df886e5a98ad3029c5dbc8cee8f826558090d..bbfb7e7b9a5ccee5097c3a2a10b9ba2d51b71522 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -52,8 +52,7 @@ EXTRA_LIBRARIES = libfoo.a
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep '^Makefile.am:.*:   !A and !C and !D$' stderr
 # Is there only one missing condition?
 test `grep ':  ' stderr | wc -l` = 1 || exit 1
index 37354b316eb2c36da44494c09083f91877352eb1..ed3c430f3a0a89e764967bfb40dc4cc92c9bb5c7 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -29,6 +29,5 @@ EXTRA_LTLIBRARIES = liblib.la
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AC_PROG_LIBTOOL stderr
index f88ac8d4b1722ab6587f0d4ef1beb5d8491e50f5..b7412ae62cb721a9fcf7fc87ed5d32e2b78fc115 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -45,8 +45,7 @@ END
 
 libtoolize
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'liba\.la.* installed .*lib' stderr
 grep 'Makefile.am:5:' stderr
 grep 'Makefile.am:2:' stderr
index 2bcf9aa6fd3041a4e10277ddcb374b78ae3363da..b733cad53fd2ccdac7afafeb40e25db6dd41be4b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -31,8 +31,7 @@ lisp_LISP = foo.el
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AM_PATH_LISPDIR stderr
 
 
@@ -45,8 +44,7 @@ lisp_LISP = foo.el
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AM_PATH_LISPDIR stderr
 
 echo 3
@@ -58,8 +56,7 @@ lisp_LISP = foo.el
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AM_PATH_LISPDIR stderr
 
 
index 8ee95c9963542d9624b1319a7f3b668a7829cab1..dc5f948f9cda7db7ce3ca9a90b8a4f3e74cef210 100755 (executable)
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -49,8 +49,7 @@ VAR = 1 \
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 
 # Smash the useless difference of lib file locations.
 sed 's,^.*lib/am/\([a-z]*\.am\),\1,' stderr >observed
index a86b84f322e7492d99f5176b79e054f04c6855c1..d2b1d42fd15877dc2bf6f8e11af7f00437fd751c 100755 (executable)
@@ -34,8 +34,7 @@ END
 : > Makefile.am
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'configure.in:2:.*no-dist-gzip' stderr
 
 echo 'AUTOMAKE_OPTIONS = dist-bzip2' > Makefile.am
index 5e11f0c4a9f25ce62b77bff1c2ef1a4352d8e2b4..aa6d349c49d95147e007a6970220c3dcfd19c160 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -33,6 +33,5 @@ END
 : > Makefile.am
 
 $ACLOCAL
-$AUTOMAKE > output 2>&1 && exit 1
-cat output
-grep 'found or specified' output
+AUTOMAKE_fails
+grep 'found or specified' stderr
index c8398e128736a772fb4694bfda2e0614fd69958e..bed724a4664a2fa05381f16331ba0a8f2f1b00da 100755 (executable)
@@ -45,8 +45,7 @@ END
 
 $ACLOCAL
 $AUTOMAKE -Wno-override
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep install-local stderr && exit 1 # There is no such thing as install-local
 grep installcheck-local stderr
 grep html-local stderr
index e476ccbd1ca937c992762dfeddbb2821ede2842f..960e9dac4e24ad595cc4bfe5be2a0d29e2f36096 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -38,5 +38,5 @@ liver_SOURCES = foo.c
 EOF
 
 $ACLOCAL
-$AUTOMAKE -Wportability && exit 1
-exit 0
+AUTOMAKE_fails -Wportability
+grep 'Makefile.am:4:.*%' stderr
index c8b62736351ab0bbeab343f196cb5172d01a4158..2fafb8ad8fe98b448883dd1702ee6af0454c0356 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -38,8 +38,7 @@ ${ARCH}/%.$(OBJEXT): %.c
 EOF
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep '%.*pattern.*rules' stderr
 
 # No error otherwise.
index 90ff195fed48fc35b70037e76083f11d3a29b17a..2736c4b48cdaeabe6991e35d532c32c0f0ce3b72 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 echo 'AM_CONDITIONAL(CHECK, true)' >> configure.in
 
 cat > Makefile.am << 'END'
@@ -31,10 +33,8 @@ endif
 INCLUDES += def
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE 2>stderr && exit 1
-
-cat stderr # for debugging
+$ACLOCAL
+AUTOMAKE_fails
 
 # We expect the following diagnostic:
 #
@@ -45,19 +45,18 @@ cat stderr # for debugging
 # Makefile.am:4: `+=' in the same conditions as the definitions.
 
 # Is !CHECK mentioned?
-grep ':.*!CHECK$' stderr || exit 1
+grep ':.*!CHECK$' stderr
 # Is there only one missing condition?
-test `grep ':  ' stderr | wc -l` = 1 || exit 1
+test `grep ':  ' stderr | wc -l` = 1
 
 # By the way, Automake should suggest using AM_CPPFLAGS,
 # because INCLUDES is an obsolete name.
-grep AM_CPPFLAGS stderr || exit 1
+grep AM_CPPFLAGS stderr
 
 # A way to suppress the obsolete warning is to use
 # -Wno-obsolete:
 echo 'AUTOMAKE_OPTIONS = -Wno-obsolete' >> Makefile.am
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep AM_CPPFLAGS stderr && exit 1
 # !CHECK should still be mentioned.
-grep ':.*!CHECK$' stderr || exit 1
+grep ':.*!CHECK$' stderr
index 3b426a472077f3a2429f3a5e6e1fac56b514abe0..e2cc6dcdc2cc91e19e69320ab67aae726b7fd600 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_RANLIB
@@ -36,6 +38,6 @@ END
 
 : > q.c
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:3:.*AR' stderr
index 527215a4cbea2116284a91ab09fcf185e8a5d013..828485a579dbce148fd29ea3a0ab0f6161e1f17b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >>configure.in <<EOF
 AM_CONDITIONAL(COND1, true)
 AM_CONDITIONAL(COND2, true)
@@ -52,10 +54,8 @@ endif
 B += dd
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE 2>stderr && exit 1
-
-cat stderr # for debugging
+$ACLOCAL
+AUTOMAKE_fails
 
 # We expect the following diagnostic:
 #
@@ -69,8 +69,6 @@ cat stderr # for debugging
 # COND1_FALSE (merging the last two conditions), so we'll support
 # this case in the check too.
 
-grep ':   !COND1 and !COND3$' stderr || exit 1
+grep ':   !COND1 and !COND3$' stderr
 # Make sure there is exactly one missing condition.
-test `grep ':  ' stderr | wc -l` = 1 || exit 1
-
-:
+test `grep ':  ' stderr | wc -l` = 1
index ba79ae38c4c10bff0badee8893721dc132ed0128..d2acb0a6234d2010572f1876b4e945c1304053c7 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -23,6 +23,8 @@
 required=libtoolize
 . ./defs || exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT(Makefile.am)
 AM_INIT_AUTOMAKE(hello,0.23)
@@ -38,7 +40,7 @@ helldl_SOURCES = foo.c
 libfoo_la_SOURCES = foo.c
 END
 
-libtoolize || exit 1
-$ACLOCAL || exit 1
-$AUTOMAKE -a && exit 1
-exit 0
+libtoolize
+$ACLOCAL
+AUTOMAKE_fails -a
+$FGREP 'foo.$(OBJEXT)' stderr
index fce700cf26fd59786af7979b14220c32260cc85f..3b9915971780e317d7eaff64864713ea81739609 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = @programs@
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'EXTRA_PROGRAMS' stderr
index 0a036bf9929a0f472b8ac0ca131a8065f002b55d..fccbf4f4bb3e7e28d21cbb78b0f27533c6b0991d 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 echo AC_PROG_CC >> configure.in
 
 cat > Makefile.am << 'END'
@@ -29,6 +31,6 @@ bin_PROGRAMS = @programs@
 EXTRA_PROGRAMS = joe @more@
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep EXTRA_PROGRAMS stderr
index fb74145ee12f2897b0a8aced8bc5a53232a16796..b17e26f76f0a2da1e3b21224723177b9a2ba1b8a 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -33,8 +33,7 @@ python_PYTHON = foo.py
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
 echo 2
@@ -46,8 +45,7 @@ pkgpython_PYTHON = foo.py
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
 
@@ -60,8 +58,7 @@ pyexec_PYTHON = foo.py
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
 
@@ -74,8 +71,7 @@ pkgpyexec_PYTHON = foo.py
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
 
@@ -88,8 +84,7 @@ pkgpyexec_PYTHON = foo.py
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
 
index bea8f3576c0d16454e4cb12677a3520f80a3416b..d4db672e193fefa2028600bf411c23ad1a3c1f66 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
@@ -36,6 +38,6 @@ bin_PROGRAMS = $(foo)
 foo = $(bin_PROGRAMS)
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:.*bin_PROGRAMS.*recursively defined' stderr
index ab17a168eda1538cfc008d6b940e7b58eaa41e27..428575bfaaee1acb89f3b812e7ab780961e9dbc1 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -52,8 +52,7 @@ $AUTOCONF
 
 test -f autoconf/ltmain.sh # Sanity check.
 rm -f autoconf/ltmain.sh
-$AUTOMAKE --add-missing --copy 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --add-missing --copy
 grep 'autoconf/ltmain.sh' stderr
 grep 'running more than two' stderr && exit 1
 
index 3b2ecdbc6c6f41fafce611aa484d340de80f02e1..17aa17e08fb71c02dc59ec7ea38cdf7fe5ab651a 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997, 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -40,7 +40,6 @@ END
 : > mountlist.c
 
 $ACLOCAL
-$AUTOMAKE 2>err && exit 1
-cat err
-$FGREP CC err
-$FGREP CXX err
+AUTOMAKE_fails
+$FGREP CC stderr
+$FGREP CXX stderr
index 7670cdd31829805f41ab734dd72477ce045aa752..069d67ee60f28fbebf1e05397e78b457120597f6 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
@@ -34,12 +36,13 @@ foo_CFLAGS = -DBAR
 END
 
 # Make sure `compile' is required.
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
+$ACLOCAL
+AUTOMAKE_fails
+grep 'required.*compile' stderr
 
 : > compile
 
-$AUTOMAKE || exit 1
+$AUTOMAKE
 
 # Look for $(COMPILE) -c in .c.o rule.
 grep 'COMPILE. [^-]' Makefile.in && exit 1
index 514b95236f052248493ec528bbd55a4880a4e9fb..d1c2000c8db786fbdc31d28319492fe60417490c 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_CXX
@@ -37,22 +39,23 @@ libfoo_a_CXXFLAGS = -DZOT
 END
 
 # Make sure `compile' is required.
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
+$ACLOCAL
+AUTOMAKE_fails
+grep 'required.*compile' stderr
 
 : > compile
 
-$AUTOMAKE || exit 1
+$AUTOMAKE
 
 # Look for $(COMPILE) -c in .c.o rule.
 grep 'COMPILE. [^-]' Makefile.in && exit 1
 
 # Look for libfoo_a-foo.o.
-grep foo Makefile.in || exit 1
+grep foo Makefile.in
 grep '[^-]foo\.o' Makefile.in && exit 1
 
 # Look for libfoo_a-bar.o.
-grep bar Makefile.in || exit 1
+grep bar Makefile.in
 grep '[^-]bar\.o' Makefile.in && exit 1
 
 exit 0
index dbcde0b36906daf98c085d99d7b1ee9617c2aa9e..ee0e82f8bc3daf48f4605c8058f1187b3cea267b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = zardoz foo
 zardoz_SOURCES = x.c
 boo_SOURCES = y.c
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:3:.*boo' stderr
index 2180f160f966bfdf379a6cc7121391385a578b8c..bac6699b97fd05fdac4a4e94998ba4c6717ea41b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 echo AC_PROG_CC >> configure.in
 
 cat > Makefile.am << 'END'
@@ -30,6 +32,6 @@ zardoz_SOURCES = x.c
 qardoz_LDADD = -ljoe
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:3:.*qardoz' stderr
index 8cd226bf2080989557c2712488aae81bdc1becd1..aeb2cff75cad7fd102d842f91bdcefe2bca951ad 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
@@ -32,6 +34,6 @@ x_SOURCES = x.c @FOO@
 EXTRA_x_SOURCES = y.c
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:2:.*x_SOURCES.*substitution' stderr
index 797dfb61a30ed9355a36f51a6178b1a788074b2f..254f5d0e66e78a05cb8a4367c9944427e18f1db0 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
@@ -34,6 +36,7 @@ x_SOURCES = x.c $(foo)
 EXTRA_x_SOURCES = y.c
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:2:.*bar.*substitution' stderr
+grep 'Makefile.am:2:.*x_SOURCES' stderr
index bad86ada499379eeb71e6229e7c609d37133ded1..1f4bdad4fced3d1c1fa5532fd4d0e32ea441efd7 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -34,7 +34,6 @@ noinst_LIBRARIES = foo
 END
 
 $ACLOCAL
-$AUTOMAKE 2> output.log && exit 1
-cat output.log
+AUTOMAKE_fails
 # We're specifically testing for line-number information.
-grep 'Makefile.am:1:.*foo.*standard library name' output.log
+grep 'Makefile.am:1:.*foo.*standard library name' stderr
index f76b1606f574551cbed8918195162f375186280d..283f5b458b861b854a637ea3de72edd9cca9fbfb 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -36,8 +36,7 @@ echo 'SUBDIRS = obj' >Makefile.am
 
 $ACLOCAL
 
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'obj.*BSD' stderr
 
 cat >Makefile.am <<EOF
@@ -45,6 +44,5 @@ SUBDIRS = @STH@
 DIST_SUBDIRS = obj
 EOF
 
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'obj.*BSD' stderr
index 9bc721468f8ef06ed5e57bd98516c470d6ef1227..077cc156b292b70b0b96fcbaada508345abe3907 100755 (executable)
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -23,6 +23,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT(fakelib.c)
 AM_INIT_AUTOMAKE(fakelib,0.0)
@@ -44,11 +46,8 @@ libfake@SUBST@.a: Makefile $(libfake@SUBST@_a_OBJECTS) $(libfake@SUBST@_a_DEPEND
        @echo here we do some custom stuff, instead of invoking the linker
 END
 
-set -e
-
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 grep 'overrid.*libfake@SUBST@.a' stderr
 num=`grep '^libfake@SUBST@.a:' Makefile.in | wc -l`
 test $num -eq 1
index 1ba71ba5222491a606fab06218a36ff7fe7bf1c1..03cb3934a0ce7e8b615a5f6cb07c2cf754c38cb0 100755 (executable)
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -50,8 +50,7 @@ END
 $ACLOCAL
 $AUTOCONF
 # What we do is not portable.  Automake should warn.
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep 'Inference rules can have only one target before the colon' stderr
 # But this should work anyway.
 $AUTOMAKE -a -Wno-portability
index 6b505de280561c7ceb9fd8be8e2d7b067988ce09..597336d9e5fe100e974ee71ccbb1044403cf547c 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -23,6 +23,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 rm -f install-sh
 rm -f mkinstalldirs
 
@@ -32,6 +34,6 @@ cat >> configure.in << 'END'
 AC_CONFIG_AUX_DIR(sub)
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE --add-missing && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails --add-missing
+grep 'error while making link' stderr
index c04639d9d6977ff3cf6af3dc8f4479996ed95d9a..733112e2478e9548affb9d1ff5affdb69455636e 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 foo = q \
 
 lib_LTLIBRARIES = foo.la
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:2:.*blank line' stderr
index 91ca5ef98034c33e34925315693f04d5a89d65b4..98764528564cd24c98964ce299be05dd39df8ebc 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -35,6 +35,5 @@ END
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
 grep 'redefinition.*ctags' stderr
index 31af8b8bf79215e935887f369a4bd264f8c700f2..faeecdc8ce39b477e99e9de276389bc0dd75286d 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
 END
@@ -29,6 +31,6 @@ END
 echo '@setfilename textutils.frob' > textutils.texi
 : > texinfo.tex
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'textutils.texi:1:.*textutils.frob.*extension' stderr
index eca3ad9387dea83c5e42d37f00db89760b93c1ef..082bce33135afb94fc0ee7121fb46dff0eb2f279 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = 9.9x
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:1:.*Automake 9.9x' stderr
index d33b801eff65fc6c6864dca8186c902480d94502..2ee4391864ac4b85a68f2aabf022591b7fd8798e 100755 (executable)
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -24,7 +24,6 @@
 
 set -e
 
-
 cat >>configure.in <<END
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
@@ -49,8 +48,7 @@ foo_SOURCES = unused
 END
 
 $ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
 # The expected diagnostic is
 #   Makefile.am:3: unused variable: `foo_SOURCES'
 #   sub/Makefile.am:2: `INCLUDES' is the old name for `AM_CPPFLAGS'
index 2c923e4835a23102b67d2edbc30cf97843c2ac6b..5ba93d96cac40192bb86a62ce2dcd72279179539 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1997, 1998, 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003
+#   Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +15,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -23,6 +24,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = zardoz
 zardoz_SOURCES = z.c x/z.c
@@ -38,5 +41,5 @@ mkdir x
 : > x/z.c
 
 $ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+AUTOMAKE_fails
+$FGREP 'z.$(OBJEXT)' stderr
index 9bb304432fb2ccea25d6d9652a36ea9496fd4e0f..e39cb7ac82786dc9fbb462cce60590b79b82692f 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
+# along with Automake; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
@@ -23,6 +23,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_YACC
@@ -39,8 +41,8 @@ cp Makefile.am Makefile.src
 
 
 
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # If zardoz.h IS mentioned, fail
 grep 'zardoz.h' Makefile.in > /dev/null && exit 1
@@ -50,17 +52,17 @@ grep 'zardoz.h' Makefile.in > /dev/null && exit 1
 cp Makefile.src Makefile.am
 echo 'AM_YFLAGS = -d' >> Makefile.am
 
-$AUTOMAKE || exit 1
+$AUTOMAKE
 
 # If zardoz.h is NOT mentioned, fail
-grep 'zardoz.h' Makefile.in > /dev/null || exit 1
+grep 'zardoz.h' Makefile.in > /dev/null
 
 
 
 cp Makefile.src Makefile.am
 echo 'AM_YFLAGS = ' >> Makefile.am
 
-$AUTOMAKE || exit 1
+$AUTOMAKE
 
 # If zardoz.h IS mentioned, fail
 grep 'zardoz.h' Makefile.in > /dev/null && exit 1
@@ -71,22 +73,21 @@ cp Makefile.src Makefile.am
 echo 'YFLAGS = -d' >> Makefile.am
 
 # YFLAGS is a use variable.
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
-grep 'YFLAGS' stderr || exit 1
-$AUTOMAKE -Wno-gnu || exit 1
+AUTOMAKE_fails
+grep 'YFLAGS' stderr
+$AUTOMAKE -Wno-gnu
 
 # If zardoz.h is NOT mentioned, fail
-grep 'zardoz.h' Makefile.in > /dev/null || exit 1
+grep 'zardoz.h' Makefile.in > /dev/null
 
 
 
 cp Makefile.src Makefile.am
 echo 'YFLAGS = ' >> Makefile.am
 
-$AUTOMAKE -Wno-gnu || exit 1
+$AUTOMAKE -Wno-gnu
 
 # If zardoz.h IS mentioned, fail
 grep 'zardoz.h' Makefile.in > /dev/null && exit 1
 
-exit 0
+: