From b57f0424ad043d2a932a38d92ac33b3bf497d3ac Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 3 Jul 2003 18:58:49 +0000 Subject: [PATCH] * 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. --- ChangeLog | 37 +++++++++++++++++++++++++++++++++++++ Makefile.am | 10 +++++++--- Makefile.in | 12 ++++++++---- tests/README | 3 +-- tests/alloca.test | 3 +-- tests/alloca2.test | 3 +-- tests/ansi8.test | 7 +++---- tests/asm.test | 11 ++++------- tests/backsl3.test | 2 +- tests/backsl4.test | 3 +-- tests/badline.test | 16 ++++++++++------ tests/badopt.test | 9 +++++---- tests/canon.test | 12 +++++++----- tests/canon5.test | 17 ++++++++++------- tests/colneq.test | 7 +++---- tests/comment3.test | 12 +++++++----- tests/comment5.test | 13 +++++-------- tests/cond2.test | 12 +++++++----- tests/cond20.test | 8 ++++---- tests/cond23.test | 6 +++--- tests/cond24.test | 6 +++--- tests/cond27.test | 7 +++---- tests/condinc2.test | 12 +++++++----- tests/conff2.test | 3 +-- tests/cxx2.test | 7 +++---- tests/defs.in | 36 ++++++++++++++++++++++++++++++++++++ tests/dejagnu2.test | 5 ++--- tests/dirforbid.test | 8 ++++---- tests/distcom3.test | 7 +++---- tests/else.test | 14 ++++++++------ tests/exdir2.test | 13 ++++++++----- tests/exeext2.test | 8 +++----- tests/gcj2.test | 12 +++++++----- tests/gcj5.test | 7 +++---- tests/getopt.test | 16 ++++++---------- tests/gettext.test | 14 +++++--------- tests/gettext2.test | 11 ++++------- tests/gnits.test | 20 +++++++++++--------- tests/gnuwarn.test | 7 +++---- tests/gnuwarn2.test | 3 +-- tests/insh.test | 11 ++++++----- tests/lex2.test | 7 +++---- tests/libobj10.test | 13 ++++++++----- tests/libobj12.test | 8 +++----- tests/libobj13.test | 7 +++---- tests/libobj3.test | 5 ++--- tests/library2.test | 7 +++---- tests/library3.test | 7 +++---- tests/libtool4.test | 7 +++---- tests/libtool6.test | 7 +++---- tests/lisp2.test | 13 +++++-------- tests/location.test | 5 ++--- tests/nogzip2.test | 3 +-- tests/output5.test | 9 ++++----- tests/overrid.test | 3 +-- tests/percent.test | 8 ++++---- tests/percent2.test | 7 +++---- tests/pluseq5.test | 23 +++++++++++------------ tests/pluseq7.test | 12 +++++++----- tests/pluseq9.test | 18 ++++++++---------- tests/pr211.test | 14 ++++++++------ tests/primary.test | 12 +++++++----- tests/primary2.test | 12 +++++++----- tests/python2.test | 19 +++++++------------ tests/recurs.test | 12 +++++++----- tests/reqd2.test | 7 +++---- tests/seenc.test | 11 +++++------ tests/specflg.test | 13 ++++++++----- tests/specflg2.test | 17 ++++++++++------- tests/spell.test | 12 +++++++----- tests/spell2.test | 12 +++++++----- tests/srcsub.test | 12 +++++++----- tests/srcsub2.test | 13 ++++++++----- tests/stdlib.test | 9 ++++----- tests/subdir7.test | 10 ++++------ tests/substtarg.test | 9 ++++----- tests/suffix11.test | 5 ++--- tests/symlink.test | 12 +++++++----- tests/syntax.test | 12 +++++++----- tests/targetclash.test | 7 +++---- tests/txinfo4.test | 12 +++++++----- tests/version3.test | 12 +++++++----- tests/warnopts.test | 6 ++---- tests/xsource.test | 11 +++++++---- tests/yacc2.test | 29 +++++++++++++++-------------- 85 files changed, 489 insertions(+), 410 deletions(-) diff --git a/ChangeLog b/ChangeLog index ee33b2aa..f7f9ee54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,42 @@ 2003-07-03 Alexandre Duret-Lutz + * 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. diff --git a/Makefile.am b/Makefile.am index cfad0e49..aad258ff 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/Makefile.in b/Makefile.in index 957bcb9e..2a0f7570 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/tests/README b/tests/README index 1f06b29b..5aa328bc 100644 --- a/tests/README +++ b/tests/README @@ -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 diff --git a/tests/alloca.test b/tests/alloca.test index 15811f39..d2a10d81 100755 --- a/tests/alloca.test +++ b/tests/alloca.test @@ -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 diff --git a/tests/alloca2.test b/tests/alloca2.test index 36db4af0..d91fed96 100755 --- a/tests/alloca2.test +++ b/tests/alloca2.test @@ -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 diff --git a/tests/ansi8.test b/tests/ansi8.test index c4ce8e27..d05119df 100755 --- a/tests/ansi8.test +++ b/tests/ansi8.test @@ -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 diff --git a/tests/asm.test b/tests/asm.test index 6802fc28..e4a7f8af 100755 --- a/tests/asm.test +++ b/tests/asm.test @@ -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 diff --git a/tests/backsl3.test b/tests/backsl3.test index bb465e49..1448d2e6 100755 --- a/tests/backsl3.test +++ b/tests/backsl3.test @@ -30,6 +30,6 @@ foo = \ END $ACLOCAL -$AUTOMAKE 2>stderr && exit 1 +AUTOMAKE_fails cat stderr grep 'trailing backslash' stderr diff --git a/tests/backsl4.test b/tests/backsl4.test index a5932495..bb20b4e3 100755 --- a/tests/backsl4.test +++ b/tests/backsl4.test @@ -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 diff --git a/tests/badline.test b/tests/badline.test index 5fb113ed..2325f3e5 100755 --- a/tests/badline.test +++ b/tests/badline.test @@ -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. @@ -23,13 +23,17 @@ . ./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 diff --git a/tests/badopt.test b/tests/badopt.test index 748d3d6f..9837b3ff 100755 --- a/tests/badopt.test +++ b/tests/badopt.test @@ -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 diff --git a/tests/canon.test b/tests/canon.test index 79971446..42fc107a 100755 --- a/tests/canon.test +++ b/tests/canon.test @@ -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 diff --git a/tests/canon5.test b/tests/canon5.test index 66e6519f..6db9f360 100755 --- a/tests/canon5.test +++ b/tests/canon5.test @@ -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. # @@ -19,10 +19,12 @@ # 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 diff --git a/tests/colneq.test b/tests/colneq.test index cf4aea9c..908fba25 100755 --- a/tests/colneq.test +++ b/tests/colneq.test @@ -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 diff --git a/tests/comment3.test b/tests/comment3.test index 541697f6..fd36e163 100755 --- a/tests/comment3.test +++ b/tests/comment3.test @@ -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. @@ -25,11 +25,13 @@ . ./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 diff --git a/tests/comment5.test b/tests/comment5.test index a81559df..f4d523e8 100755 --- a/tests/comment5.test +++ b/tests/comment5.test @@ -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 diff --git a/tests/cond2.test b/tests/cond2.test index bbc672f7..68d5ca1d 100755 --- a/tests/cond2.test +++ b/tests/cond2.test @@ -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 diff --git a/tests/cond20.test b/tests/cond20.test index c550c48d..e56fbea0 100755 --- a/tests/cond20.test +++ b/tests/cond20.test @@ -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 diff --git a/tests/cond23.test b/tests/cond23.test index 0442a8e4..c6fe42dc 100755 --- a/tests/cond23.test +++ b/tests/cond23.test @@ -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 diff --git a/tests/cond24.test b/tests/cond24.test index 4260340e..11b6eb54 100755 --- a/tests/cond24.test +++ b/tests/cond24.test @@ -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 diff --git a/tests/cond27.test b/tests/cond27.test index 9b741063..aa6741e9 100755 --- a/tests/cond27.test +++ b/tests/cond27.test @@ -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 diff --git a/tests/condinc2.test b/tests/condinc2.test index 0f8fbe74..ae808efd 100755 --- a/tests/condinc2.test +++ b/tests/condinc2.test @@ -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 diff --git a/tests/conff2.test b/tests/conff2.test index 3808da71..8e3e01c2 100755 --- a/tests/conff2.test +++ b/tests/conff2.test @@ -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 diff --git a/tests/cxx2.test b/tests/cxx2.test index 5afaa0c2..3b020c5c 100755 --- a/tests/cxx2.test +++ b/tests/cxx2.test @@ -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 diff --git a/tests/defs.in b/tests/defs.in index 1d0735a1..ca310420 100644 --- a/tests/defs.in +++ b/tests/defs.in @@ -22,6 +22,18 @@ # Defines for Automake testing environment. # Tom Tromey +# 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 diff --git a/tests/dejagnu2.test b/tests/dejagnu2.test index c6142b65..7cca82ce 100755 --- a/tests/dejagnu2.test +++ b/tests/dejagnu2.test @@ -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 diff --git a/tests/dirforbid.test b/tests/dirforbid.test index f112a1c7..9cc40491 100755 --- a/tests/dirforbid.test +++ b/tests/dirforbid.test @@ -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 : diff --git a/tests/distcom3.test b/tests/distcom3.test index e92ccfa3..40880fc3 100755 --- a/tests/distcom3.test +++ b/tests/distcom3.test @@ -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 diff --git a/tests/else.test b/tests/else.test index 04bbdd53..7510eb03 100755 --- a/tests/else.test +++ b/tests/else.test @@ -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 diff --git a/tests/exdir2.test b/tests/exdir2.test index d5d0c7e4..1f21ef2f 100755 --- a/tests/exdir2.test +++ b/tests/exdir2.test @@ -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,11 +22,14 @@ . ./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 diff --git a/tests/exeext2.test b/tests/exeext2.test index 6402a577..f216351e 100755 --- a/tests/exeext2.test +++ b/tests/exeext2.test @@ -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 diff --git a/tests/gcj2.test b/tests/gcj2.test index 1a8eb1a1..33b43c4f 100755 --- a/tests/gcj2.test +++ b/tests/gcj2.test @@ -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 diff --git a/tests/gcj5.test b/tests/gcj5.test index a84db785..87d465b8 100755 --- a/tests/gcj5.test +++ b/tests/gcj5.test @@ -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 diff --git a/tests/getopt.test b/tests/getopt.test index 2e96d938..cceb43ee 100755 --- a/tests/getopt.test +++ b/tests/getopt.test @@ -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. @@ -26,24 +26,20 @@ 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 : diff --git a/tests/gettext.test b/tests/gettext.test index a4d2e686..ef9d37f8 100755 --- a/tests/gettext.test +++ b/tests/gettext.test @@ -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 diff --git a/tests/gettext2.test b/tests/gettext2.test index f72da9e2..b572f768 100755 --- a/tests/gettext2.test +++ b/tests/gettext2.test @@ -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 diff --git a/tests/gnits.test b/tests/gnits.test index c48f4e1b..f5567610 100755 --- a/tests/gnits.test +++ b/tests/gnits.test @@ -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. @@ -22,10 +22,12 @@ . ./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 diff --git a/tests/gnuwarn.test b/tests/gnuwarn.test index 9dca3b17..4c7bfdf8 100755 --- a/tests/gnuwarn.test +++ b/tests/gnuwarn.test @@ -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. diff --git a/tests/gnuwarn2.test b/tests/gnuwarn2.test index bf3753b8..cf352d63 100755 --- a/tests/gnuwarn2.test +++ b/tests/gnuwarn2.test @@ -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 diff --git a/tests/insh.test b/tests/insh.test index b4c0e7f0..a8e82ef8 100755 --- a/tests/insh.test +++ b/tests/insh.test @@ -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. # @@ -23,11 +23,12 @@ . ./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 diff --git a/tests/lex2.test b/tests/lex2.test index 01e9c061..d715b338 100755 --- a/tests/lex2.test +++ b/tests/lex2.test @@ -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 diff --git a/tests/libobj10.test b/tests/libobj10.test index 8dd3ca7b..03435143 100755 --- a/tests/libobj10.test +++ b/tests/libobj10.test @@ -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 diff --git a/tests/libobj12.test b/tests/libobj12.test index e8237e48..c3de96dd 100755 --- a/tests/libobj12.test +++ b/tests/libobj12.test @@ -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 diff --git a/tests/libobj13.test b/tests/libobj13.test index 528fec9f..70b9c845 100755 --- a/tests/libobj13.test +++ b/tests/libobj13.test @@ -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 diff --git a/tests/libobj3.test b/tests/libobj3.test index 8e1331c5..58c24af8 100755 --- a/tests/libobj3.test +++ b/tests/libobj3.test @@ -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 diff --git a/tests/library2.test b/tests/library2.test index 03fb0171..316d1746 100755 --- a/tests/library2.test +++ b/tests/library2.test @@ -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 diff --git a/tests/library3.test b/tests/library3.test index d07df886..bbfb7e7b 100755 --- a/tests/library3.test +++ b/tests/library3.test @@ -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 diff --git a/tests/libtool4.test b/tests/libtool4.test index 37354b31..ed3c430f 100755 --- a/tests/libtool4.test +++ b/tests/libtool4.test @@ -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 diff --git a/tests/libtool6.test b/tests/libtool6.test index f88ac8d4..b7412ae6 100755 --- a/tests/libtool6.test +++ b/tests/libtool6.test @@ -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 diff --git a/tests/lisp2.test b/tests/lisp2.test index 2bcf9aa6..b733cad5 100755 --- a/tests/lisp2.test +++ b/tests/lisp2.test @@ -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 diff --git a/tests/location.test b/tests/location.test index 8ee95c99..dc5f948f 100755 --- a/tests/location.test +++ b/tests/location.test @@ -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 diff --git a/tests/nogzip2.test b/tests/nogzip2.test index a86b84f3..d2b1d42f 100755 --- a/tests/nogzip2.test +++ b/tests/nogzip2.test @@ -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 diff --git a/tests/output5.test b/tests/output5.test index 5e11f0c4..aa6d349c 100755 --- a/tests/output5.test +++ b/tests/output5.test @@ -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 diff --git a/tests/overrid.test b/tests/overrid.test index c8398e12..bed724a4 100755 --- a/tests/overrid.test +++ b/tests/overrid.test @@ -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 diff --git a/tests/percent.test b/tests/percent.test index e476ccbd..960e9dac 100755 --- a/tests/percent.test +++ b/tests/percent.test @@ -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 diff --git a/tests/percent2.test b/tests/percent2.test index c8b62736..2fafb8ad 100755 --- a/tests/percent2.test +++ b/tests/percent2.test @@ -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. diff --git a/tests/pluseq5.test b/tests/pluseq5.test index 90ff195f..2736c4b4 100755 --- a/tests/pluseq5.test +++ b/tests/pluseq5.test @@ -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 diff --git a/tests/pluseq7.test b/tests/pluseq7.test index 3b426a47..e2cc6dcd 100755 --- a/tests/pluseq7.test +++ b/tests/pluseq7.test @@ -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 diff --git a/tests/pluseq9.test b/tests/pluseq9.test index 527215a4..828485a5 100755 --- a/tests/pluseq9.test +++ b/tests/pluseq9.test @@ -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 <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 diff --git a/tests/pr211.test b/tests/pr211.test index ba79ae38..d2acb0a6 100755 --- a/tests/pr211.test +++ b/tests/pr211.test @@ -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 diff --git a/tests/primary.test b/tests/primary.test index fce700cf..3b991597 100755 --- a/tests/primary.test +++ b/tests/primary.test @@ -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. @@ -22,10 +22,12 @@ . ./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 diff --git a/tests/primary2.test b/tests/primary2.test index 0a036bf9..fccbf4f4 100755 --- a/tests/primary2.test +++ b/tests/primary2.test @@ -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 diff --git a/tests/python2.test b/tests/python2.test index fb74145e..b17e26f7 100755 --- a/tests/python2.test +++ b/tests/python2.test @@ -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 diff --git a/tests/recurs.test b/tests/recurs.test index bea8f357..d4db672e 100755 --- a/tests/recurs.test +++ b/tests/recurs.test @@ -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 diff --git a/tests/reqd2.test b/tests/reqd2.test index ab17a168..428575bf 100755 --- a/tests/reqd2.test +++ b/tests/reqd2.test @@ -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 diff --git a/tests/seenc.test b/tests/seenc.test index 3b2ecdbc..17aa17e0 100755 --- a/tests/seenc.test +++ b/tests/seenc.test @@ -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 diff --git a/tests/specflg.test b/tests/specflg.test index 7670cdd3..069d67ee 100755 --- a/tests/specflg.test +++ b/tests/specflg.test @@ -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 diff --git a/tests/specflg2.test b/tests/specflg2.test index 514b9523..d1c2000c 100755 --- a/tests/specflg2.test +++ b/tests/specflg2.test @@ -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 diff --git a/tests/spell.test b/tests/spell.test index dbcde0b3..ee0e82f8 100755 --- a/tests/spell.test +++ b/tests/spell.test @@ -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. @@ -22,12 +22,14 @@ . ./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 diff --git a/tests/spell2.test b/tests/spell2.test index 2180f160..bac6699b 100755 --- a/tests/spell2.test +++ b/tests/spell2.test @@ -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 diff --git a/tests/srcsub.test b/tests/srcsub.test index 8cd226bf..aeb2cff7 100755 --- a/tests/srcsub.test +++ b/tests/srcsub.test @@ -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 diff --git a/tests/srcsub2.test b/tests/srcsub2.test index 797dfb61..254f5d0e 100755 --- a/tests/srcsub2.test +++ b/tests/srcsub2.test @@ -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 diff --git a/tests/stdlib.test b/tests/stdlib.test index bad86ada..1f4bdad4 100755 --- a/tests/stdlib.test +++ b/tests/stdlib.test @@ -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 diff --git a/tests/subdir7.test b/tests/subdir7.test index f76b1606..283f5b45 100755 --- a/tests/subdir7.test +++ b/tests/subdir7.test @@ -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 <stderr && exit 1 -cat stderr +AUTOMAKE_fails grep 'obj.*BSD' stderr diff --git a/tests/substtarg.test b/tests/substtarg.test index 9bc72146..077cc156 100755 --- a/tests/substtarg.test +++ b/tests/substtarg.test @@ -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 diff --git a/tests/suffix11.test b/tests/suffix11.test index 1ba71ba5..03cb3934 100755 --- a/tests/suffix11.test +++ b/tests/suffix11.test @@ -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 diff --git a/tests/symlink.test b/tests/symlink.test index 6b505de2..597336d9 100755 --- a/tests/symlink.test +++ b/tests/symlink.test @@ -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 diff --git a/tests/syntax.test b/tests/syntax.test index c04639d9..733112e2 100755 --- a/tests/syntax.test +++ b/tests/syntax.test @@ -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,12 +22,14 @@ . ./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 diff --git a/tests/targetclash.test b/tests/targetclash.test index 91ca5ef9..98764528 100755 --- a/tests/targetclash.test +++ b/tests/targetclash.test @@ -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 diff --git a/tests/txinfo4.test b/tests/txinfo4.test index 31af8b8b..faeecdc8 100755 --- a/tests/txinfo4.test +++ b/tests/txinfo4.test @@ -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 diff --git a/tests/version3.test b/tests/version3.test index eca3ad93..082bce33 100755 --- a/tests/version3.test +++ b/tests/version3.test @@ -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,10 +22,12 @@ . ./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 diff --git a/tests/warnopts.test b/tests/warnopts.test index d33b801e..2ee43918 100755 --- a/tests/warnopts.test +++ b/tests/warnopts.test @@ -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 <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' diff --git a/tests/xsource.test b/tests/xsource.test index 2c923e48..5ba93d96 100755 --- a/tests/xsource.test +++ b/tests/xsource.test @@ -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 diff --git a/tests/yacc2.test b/tests/yacc2.test index 9bb30443..e39cb7ac 100755 --- a/tests/yacc2.test +++ b/tests/yacc2.test @@ -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 +: -- 2.43.5