Enable `set -e' in more tests (plus some tweakings).
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 20 Aug 2010 20:33:44 +0000 (22:33 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 2 Dec 2010 12:19:33 +0000 (13:19 +0100)
* tests/mkinstall.test: Enable `errexit' shell flag, and related
changes.  Add a trailing `:' command, if needed.
* tests/mdate2.test: Likewise.
* tests/objc.test: Likewise.
* tests/noinst.test: Likewise.
* tests/outdir.test: Likewise.
* tests/number.test: Likewise.
* tests/pluseq.test: Likewise.
* tests/req.test: Likewise.
* tests/rulepat.test: Likewise.
* tests/specflg6.test: Likewise.
* tests/spell3.test: Likewise.
* tests/parse.test: Likewise, and ...
(configure.in): Use the stub created by ./defs, rather than
writing it from scratch.  Remove useless calls to AC_PROG_RANLIB
and AC_OUTPUT.
* tests/mdate4.test: Likewise.
* tests/mkinstall.test: Likewise, and ...
(configure.in): ... drop useless call to `AC_OUTPUT'.
* tests/output.test: Enable `errexit' shell flag, and related
changes.  Add a trailing `:' command.
(configure.in): Modernize.
* tests/output2.test: Likewise.
* tests/output3.test: Likewise.
* tests/output4.test: Likewise.
* tests/mdate3.test: Enable `errexit' shell flag, and related
changes.  Prefer `$me' over hard-coded test name.
* tests/nodistdir.test: Enable `errexit' shell flag, and related
changes.  Prefer trailing `:' over trailing `Exit 0'.
* tests/nodist.test: Likewise.  Also, prefer cat + here-doc over
echo to create input test files, and do not create useless dummy
C source files.
* tests/nodist2.test: Likewise.
* tests/ppf77.test: Enable `errexit' shell flag, with related
changes.  Add a trailing `:' command.  Do not create useless
dummy source files.
* tests/spelling.test: Enable `errexit' shell flag, with related
changes.  Add a trailing `:' command.  Also, grep Automake error
message.
* tests/specflg3.test: Enable `errexit' shell flag, with related
changes.  Avoid unportable use of `-e' option of fgrep.  Prefer
trailing `:' over trailing `Exit 0'.  Remove extra empty lines,
and cosmetic changes to whitespaces.
* tests/obsolete.test: Enable `errexit' shell flag, with related
changes.  Improve verbosity.  Other miscellanous changes.

26 files changed:
ChangeLog
tests/mdate2.test
tests/mdate3.test
tests/mdate4.test
tests/mkinstall.test
tests/nodist.test
tests/nodist3.test
tests/noinst.test
tests/noinstdir.test
tests/number.test
tests/objc.test
tests/obsolete.test
tests/outdir.test
tests/output.test
tests/output2.test
tests/output3.test
tests/output4.test
tests/parse.test
tests/pluseq.test
tests/ppf77.test
tests/req.test
tests/rulepat.test
tests/specflg3.test
tests/specflg6.test
tests/spell3.test
tests/spelling.test

index e8864f1..c32c2e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,53 @@
+2010-12-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Enable `set -e' in more tests (plus some tweakings).
+       * tests/mkinstall.test: Enable `errexit' shell flag, and related
+       changes.  Add a trailing `:' command, if needed.
+       * tests/mdate2.test: Likewise.
+       * tests/objc.test: Likewise.
+       * tests/noinst.test: Likewise.
+       * tests/outdir.test: Likewise.
+       * tests/number.test: Likewise.
+       * tests/pluseq.test: Likewise.
+       * tests/req.test: Likewise.
+       * tests/rulepat.test: Likewise.
+       * tests/specflg6.test: Likewise.
+       * tests/spell3.test: Likewise.
+       * tests/parse.test: Likewise, and ...
+       (configure.in): Use the stub created by ./defs, rather than
+       writing it from scratch.  Remove useless calls to AC_PROG_RANLIB
+       and AC_OUTPUT.
+       * tests/mdate4.test: Likewise.
+       * tests/mkinstall.test: Likewise, and ...
+       (configure.in): ... drop useless call to `AC_OUTPUT'.
+       * tests/output.test: Enable `errexit' shell flag, and related
+       changes.  Add a trailing `:' command.
+       (configure.in): Modernize.
+       * tests/output2.test: Likewise.
+       * tests/output3.test: Likewise.
+       * tests/output4.test: Likewise.
+       * tests/mdate3.test: Enable `errexit' shell flag, and related
+       changes.  Prefer `$me' over hard-coded test name.  Do not move
+       non-existent or useless files in the build auxiliary directory.
+       * tests/nodistdir.test: Enable `errexit' shell flag, and related
+       changes.  Prefer trailing `:' over trailing `Exit 0'.
+       * tests/nodist.test: Likewise.  Also, prefer cat + here-doc over
+       echo to create input test files, and do not create useless dummy
+       C source files.
+       * tests/nodist2.test: Likewise.
+       * tests/ppf77.test: Enable `errexit' shell flag, with related
+       changes.  Add a trailing `:' command.  Do not create useless
+       dummy source files.
+       * tests/spelling.test: Enable `errexit' shell flag, with related
+       changes.  Add a trailing `:' command.  Also, grep Automake error
+       message.
+       * tests/specflg3.test: Enable `errexit' shell flag, with related
+       changes.  Avoid unportable use of `-e' option of fgrep.  Prefer
+       trailing `:' over trailing `Exit 0'.  Remove extra empty lines,
+       and cosmetic changes to whitespaces.
+       * tests/obsolete.test: Enable `errexit' shell flag, with related
+       changes.  Improve verbosity.  Other miscellanous changes.
+
 2010-11-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        Fix spurious failures in `silent*.test' for $CC != gcc
index 11b6d5d..ae2524c 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
 END
@@ -32,7 +35,9 @@ END
 echo '@setfilename textutils' > textutils.texi
 
 # Use "././" to confuse Automake into thinking this is a subdir build.
-$ACLOCAL || Exit 1
-$AUTOMAKE ././Makefile || Exit 1
+$ACLOCAL
+$AUTOMAKE ././Makefile
 
 grep 'mdate-sh' Makefile.in | grep -v SHELL
+
+:
index 75105f9..b487359 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2004, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT([mdate3], [1.0])
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
 AC_CONFIG_AUX_DIR([foo])
 AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
@@ -41,11 +44,9 @@ mkdir foo
 : > foo/mdate-sh
 mv install-sh foo
 mv missing foo
-mv mkinstalldirs foo
-mv depcomp foo
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '[^/]mdate-sh' Makefile.in && Exit 1
 Exit 0
index ca24f56..c9ef899 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile sub/Makefile)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
 END
 
 cat > Makefile.am << 'END'
@@ -40,6 +40,9 @@ cat > sub/textutils.texi << 'END'
 @setfilename textutils.info
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE -a || Exit 1
+$ACLOCAL
+$AUTOMAKE -a
+ls -l sub
 test -f sub/mdate-sh
+
+:
index 4a65307..8b426e8 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 pkgdata_DATA =
 END
 
 # The "././" prefix confuses Automake into thinking it is doing a
 # subdir build.  Yes, this is hacky.
-$ACLOCAL || Exit 1
-$AUTOMAKE ././Makefile || Exit 1
+$ACLOCAL
+$AUTOMAKE ././Makefile
 
 grep ' /mkinstalldirs' Makefile.in && Exit 1
 Exit 0
index 7239338..d2c2caf 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-echo AC_PROG_CC >> configure.in
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = eyeball
@@ -28,15 +32,11 @@ nodist_eyeball_SOURCES = b.c
 dist_eyeball_SOURCES = c.c
 END
 
-: > a.c
-: > b.c
-: > c.c
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
-grep '^am_eyeball_OBJECTS' Makefile.in || Exit 1
-grep '^DIST_SOURCES =' Makefile.in || Exit 1
+grep '^am_eyeball_OBJECTS' Makefile.in
+grep '^DIST_SOURCES =' Makefile.in
 grep '^DIST_SOURCES =.*nodist' Makefile.in && Exit 1
 
-Exit 0
+:
index 21cfec3..c5470e7 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,9 @@
 
 . ./defs || Exit 1
 
-echo AC_PROG_CC >> configure.in
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = no-dist
@@ -26,12 +28,10 @@ bin_PROGRAMS = eyeball
 eyeball_SOURCES = a.c
 END
 
-: > a.c
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^dist:' Makefile.in && Exit 1
 grep '^DIST_SOURCES =' Makefile.in && Exit 1
 
-Exit 0
+:
index dd97481..075e05e 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 all-local:
        exit 1
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^install[-a-z]*:.* all' Makefile.in
+
+:
index 3f33c32..b91ac32 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 noinst_SCRIPTS = foo.sh
 noinst_DATA = foo.xpm
@@ -37,9 +39,10 @@ AC_PROG_CC
 AC_PROG_RANLIB
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep 'noinstdir' Makefile.in && Exit 1
 grep 'checkdir' Makefile.in && Exit 1
-Exit 0
+
+:
index a43ff2f..b764519 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
@@ -27,8 +29,11 @@ cat > Makefile.am << 'END'
 bin_PROGRAMS = zardoz
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
+grep '^zardoz_OBJECTS' Makefile.in
 count=`grep -c '^zardoz_OBJECTS' Makefile.in`
 test $count -eq 1
+
+:
index facc4d4..0c55f7a 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2006, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_OBJC
 END
@@ -28,7 +30,9 @@ bin_PROGRAMS = hello
 hello_SOURCES = hello.m
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^\.SUFFIXES:.*\.m' Makefile.in
+
+:
index 337e4db..6c969dc 100755 (executable)
@@ -23,6 +23,8 @@ set x ${AUTOUPDATE-autoupdate}
 required=$2
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT
 END
@@ -30,22 +32,29 @@ END
 $PERL -ne '/AU_DEFUN\(\[(\w+)\]/ && print "$1\n"' \
     "$testsrcdir/../m4/obsolete.m4" >> obs
 cat obs >> configure.in
-$PERL -ne 'chomp; print "grep $_ stderr || Exit 1\n"; ' obs > obs.1
+$PERL -ne 'chomp; print "grep $_ output || Exit 1\n"; ' obs > obs.1
 $PERL -ne 'chomp; print "grep $_ configure.in && Exit 1\n"; ' obs > obs.2
+echo : >> obs.1 # since it will be sourced, it must and with a success
+echo : >> obs.2 # ditto
+
+cat configure.in # for debugging
+cat obs.1        # ditto
+cat obs.2        # ditto
 
 # Sanity check.  Make sure we have added something to configure.in.
-test `cat configure.in | wc -l` -gt 1 || Exit 1
+test `wc -l <configure.in` -gt 1
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 
 # Expect Autoconf to complain about each of the macros in obs.
-$AUTOCONF -Wobsolete >stderr 2>&1
+$AUTOCONF -Wobsolete >output 2>&1 || { cat output; Exit 1; }
+cat output
 . ./obs.1
 # Make sure Autoupdate remove each of these macros.
-$AUTOUPDATE || Exit 1
+$AUTOUPDATE
 . ./obs.2
 
 # Autoconf should be able to grok the updated configure.in.
-$AUTOCONF || Exit 1
+$AUTOCONF
 
-Exit 0
+:
index 4bafb4e..5472aa6 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am <<'END'
 pkgdata_DATA =
 END
 
 mkdir zardir
 
-$ACLOCAL || Exit 1
-$AUTOMAKE -Wno-obsolete --output-dir=zardir || Exit 1
+$ACLOCAL
+$AUTOMAKE -Wno-obsolete --output-dir=zardir
 
 test -f Makefile.in && Exit 1
 test -f zardir/Makefile.in
+
+:
index 4f6a7cd..3931fc5 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile frob/zardoz)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_OUTPUT([Makefile frob/zardoz])
 END
 
 : > Makefile.am
@@ -29,5 +30,7 @@ END
 mkdir frob
 : > frob/zardoz.in
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
index c9bdbc3..df1c4c3 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile intl/intlh.inst po/Makefile.in misc/gettextize)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_OUTPUT([Makefile intl/intlh.inst po/Makefile.in misc/gettextize])
 END
 
 : > Makefile.am
@@ -31,8 +34,8 @@ mkdir intl po misc
 : > po/Makefile.in.am
 : > misc/gettextize.in
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^gettextize' Makefile.in && Exit 1
 Exit 0
index 02d7e6f..3c8e79b 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
 AC_OUTPUT([Makefile
 tests/Makefile tests/defs],
 [blah])
@@ -32,5 +35,7 @@ mkdir tests
 : > tests/Makefile.am
 : > tests/defs.in
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
index fc5a022..4ea75b5 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(tests/Makefile tests/defs)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_OUTPUT([tests/Makefile tests/defs])
 END
 
 mkdir tests
 : > tests/defs.in
 : > tests/Makefile.am
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep tests/defs.in tests/Makefile.in && Exit 1
 Exit 0
index e7dcbe5..6ae93a2 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
-AC_PROG_RANLIB
-AC_OUTPUT(Makefile)
 END
 
 cat > Makefile.am << 'END'
@@ -33,8 +32,8 @@ zar.c\
 doz.c
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 $FGREP zar.cdoz Makefile.in && Exit 1
 Exit 0
index 66eec8f..5cfa873 100755 (executable)
@@ -18,6 +18,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 data_DATA = zar
 data_DATA += doz
index 6c61a2e..aaeedcb 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_F77
 END
@@ -28,8 +30,7 @@ bin_PROGRAMS = ppf
 ppf_SOURCES = foo.F q.r
 END
 
-: > foo.F
-: > q.r
-
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
index 39bf349..3d89cf9 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,6 +18,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in <<EOF
 AC_INIT
 AM_INIT_GUILE_MODULE
@@ -32,6 +34,8 @@ module=[$1]
 AC_SUBST(module)])
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 
 grep 'DEFUN.*INIT_AUTOMAKE' aclocal.m4
+
+:
index c15e910..06b0c89 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 $(srcdir)/Makefile.am:
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^$(srcdir)/Makefile\.am' Makefile.in
+
+:
index 60006a5..40a383a 100755 (executable)
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(test, 0.1)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -35,14 +35,12 @@ END
 
 : > compile
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
-$FGREP -e '-o foo-foo' Makefile.in || Exit 1
-
-$FGREP 'foo.o.o' Makefile.in                       && Exit 1
-$FGREP 'foo.$(OBJEXT).$(OBJEXT)' Makefile.in       && Exit 1
+$ACLOCAL
+$AUTOMAKE
 
-$FGREP '$(foo_CFLAGS)' Makefile.in || Exit 1
+$FGREP ' -o foo-foo' Makefile.in
+$FGREP 'foo.o.o' Makefile.in && Exit 1
+$FGREP 'foo.$(OBJEXT).$(OBJEXT)' Makefile.in && Exit 1
+$FGREP '$(foo_CFLAGS)' Makefile.in
 
-Exit 0
+:
index d858769..2300142 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
-AM_CONDITIONAL(BAR, true)
+AM_CONDITIONAL([BAR], [true])
 END
 
 cat > Makefile.am << 'END'
@@ -38,8 +40,8 @@ END
 
 : > compile
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 uncondval=`$FGREP 'foo-foo.o: foo.c' Makefile.in`
 
@@ -47,8 +49,10 @@ cat >> Makefile.am << 'END'
 foo_SOURCES += $(BAR_SRCS)
 END
 
-$AUTOMAKE || Exit 1
+$AUTOMAKE
 
 condval=`$FGREP 'foo-foo.o: foo.c' Makefile.in`
 
 test "x$uncondval" = "x$condval"
+
+:
index 399328f..ac52582 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 TAGS_DEPENDENCIES = joe
 ## Required to avoid error.
 ETAGS_ARGS = joe
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
index ad1e232..3b423cf 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'EOF'
 bni_PROGRAMS = zot
 EOF
 
-if $ACLOCAL || Exit 1
-$AUTOMAKE; then
-   Exit 1
-fi
-Exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'bni_PROGRAMS' stderr
+grep 'bnidir.*undefined' stderr
+
+: