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.
2003-07-03 Alexandre Duret-Lutz <adl@gnu.org>
+ * Makefile.am (maintainer-clean): Disallow '$AUTOMAKE && exit 1'.
+ Ignore @...@ substitutions in comments.
+ * tests/defs.in: Try to make the shell more POSIX compliant.
+ (AUTOMAKE_run, AUTOMAKE_fails): New functions.
+ * tests/README: Mention AUTOMAKE_fails.
+ * tests/alloca.test, tests/alloca2.test, tests/ansi8.test,
+ * tests/asm.test, tests/backsl3.test, tests/backsl4.test,
+ * tests/badline.test, tests/badopt.test, tests/canon.test,
+ * tests/canon5.test, tests/colneq.test, tests/comment3.test,
+ * tests/comment5.test, tests/cond2.test, tests/cond20.test,
+ * tests/cond23.test, tests/cond24.test, tests/cond27.test,
+ * tests/condinc2.test, tests/conff2.test, tests/cxx2.test,
+ * tests/dejagnu2.test, tests/dirforbid.test,
+ * tests/distcom3.test, tests/else.test, tests/exdir2.test,
+ * tests/exeext2.test, tests/gcj2.test, tests/gcj5.test,
+ * tests/getopt.test, tests/gettext.test, tests/gettext2.test,
+ * tests/gnits.test, tests/gnuwarn.test, tests/gnuwarn2.test,
+ * tests/insh.test, tests/lex2.test, tests/libobj10.test,
+ * tests/libobj12.test, tests/libobj13.test,
+ * tests/libobj3.test, tests/library2.test,
+ * tests/library3.test, tests/libtool4.test,
+ * tests/libtool6.test, tests/lisp2.test, tests/location.test,
+ * tests/nogzip2.test, tests/output5.test, tests/overrid.test,
+ * tests/percent.test, tests/percent2.test,
+ * tests/pluseq5.test, tests/pluseq7.test, tests/pluseq9.test,
+ * tests/pr211.test, tests/primary.test, tests/primary2.test,
+ * tests/python2.test, tests/recurs.test, tests/reqd2.test,
+ * tests/seenc.test, tests/specflg.test, tests/specflg2.test,
+ * tests/spell.test, tests/spell2.test, tests/srcsub.test,
+ * tests/srcsub2.test, tests/stdlib.test, tests/subdir7.test,
+ * tests/substtarg.test, tests/suffix11.test,
+ * tests/symlink.test, tests/syntax.test,
+ * tests/targetclash.test, tests/txinfo4.test,
+ * tests/version3.test, tests/warnopts.test,
+ * tests/xsource.test, tests/yacc2.test: Use set -e,
+ AUTOMAKE_fails, and always grep error message.
+
* automake.in (handle_ltlibraries): Fix call to msg.
* tests/stamph.test: Delete.
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; \
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
&& $(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) \
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
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; \
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
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
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
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
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
END
$ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
grep AM_C_PROTOTYPES stderr
# 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.
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
END
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep CCAS stderr
grep AM_PROG_AS stderr
END
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep CCASFLAGS stderr
grep AM_PROG_AS stderr
END
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
+AUTOMAKE_fails
cat stderr
grep 'trailing backslash' stderr
$ACLOCAL
$AUTOCONF
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep ':1:.*whitespace' stderr
grep ':5:.*whitespace' stderr
./configure
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
-cat >> configure.in << 'END'
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
AC_SUBST(TEXINFOS)
+AC_CONFIG_FILES([Makefile])
END
: > Makefile.am
$ACLOCAL || exit 1
-$AUTOMAKE > out 2>&1 && exit 1
-grep Makefile out && exit 1
-exit 0
+AUTOMAKE_fails
+grep 'configure.in:3:.*info_TEXINFOS' stderr
#! /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.
#
# 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.
AUTOMAKE_OPTIONS = zardoz
END
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep zardoz stderr
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
echo AC_PROG_CC >> configure.in
cat > Makefile.am << 'END'
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
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# Boston, MA 02111-1307, USA.
# Test to make sure that we allow variable names starting in
-# non-letters.
+# non-letters. Whatever that might mean.
. ./defs || exit 1
+set -e
+
echo AC_PROG_CC >> configure.in
cat > Makefile.am << 'END'
123test_SOURCES = 123.c
END
-$ACLOCAL || exit 1
+$ACLOCAL
$AUTOMAKE || exit 1
cat > Makefile.am << 'END'
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
#! /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.
#
# 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.
END
$ACLOCAL
-$AUTOMAKE 2> stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep ':=.*not portable' stderr
echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat > Makefile.am << 'END'
install-data-local:
# Tru64 Unix must die
END
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:2:.*#' stderr
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
EOF
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep '^Makefile.am:5: blank line following trailing backslash' stderr
var = foo
EOF
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep '^Makefile.am:2: blank line following trailing backslash' stderr
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
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
mkdir dir1
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'dir2.*does not exist' stderr
#! /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.
#
# 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.
$ACLOCAL
$AUTOCONF
-$AUTOMAKE -a && exit 1
-$AUTOMAKE -a 2>&1| grep "recursively defined"
+AUTOMAKE_fails -a
+grep "recursively defined" stderr
#!/bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
EOF
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
+AUTOMAKE_fails
grep 'libdir was already defined' stderr
#!/bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
EOF
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
+AUTOMAKE_fails
grep 'foo was already defined' stderr
#!/bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
EOF
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep ' USE_FOO' stderr && exit 1
grep '!USE_FOO' stderr
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat >> configure.in << 'END'
AM_CONDITIONAL(TOBE, false)
END
endif
END
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'adjunct:3: too many conditionals closed' stderr
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
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
END
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep AC_PROG_CXX stderr
# Defines for Automake testing environment.
# Tom Tromey <tromey@cygnus.com>
+# Be Bourne compatible.
+# (Snippet copied from configure's initialization in Autoconf 2.57.)
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
# Ensure we are running from the right directory.
test -f ./defs || {
echo "defs: not found in current directory" 1>&2
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
# 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.
cat stdout
grep foo stdout
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep 'Makefile.am:3:.*site.exp' stderr
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
$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
:
#! /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.
#
# 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.
# 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
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
echo 'AM_CONDITIONAL(FOO, true)' >> configure.in
cat > Makefile.am << 'END'
# 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
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat > Makefile.am << 'EOF'
html_DATA = zot.html
pkgdata_DATA = qbert
EOF
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'pkgdatadir' stderr && exit 1
+grep 'Makefile.am:1:.*htmldir.*undefined' stderr
# 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.
$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
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat >> configure.in << 'END'
_AM_DEPENDENCIES(GCJ)
AC_SUBST(GCJ)
convert_SOURCES = x/../convert.java
END
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:.*\.\.' stderr
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
END
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep AM_PROG_GCJ stderr
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
set -e
# This is expected to fail ...
-$AUTOMAKE -Wnonexistant 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -Wnonexistant
grep ':.*nonexistant' stderr
# ... but this should not.
-$AUTOMAKE -Wnonexistant --help 2>stderr
-cat stderr
+AUTOMAKE_run 0 -Wnonexistant --help
grep ':.*nonexistant' stderr && exit 1
# Similarly, this should fail ...
-$AUTOMAKE --nonexistant 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails --nonexistant 2>stderr
grep ':.*nonexistant' stderr
# ... but this should not.
-$AUTOMAKE --nonexistant --help 2>stderr
-cat stderr
+AUTOMAKE_run 0 --nonexistant --help
grep ':.*nonexistant' stderr && exit 1
:
# 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.
# 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.
# 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
# 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.
# 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.
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
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
-cat > configure.in << 'END'
-PACKAGE=nonesuch
-VERSION=3.5.3.2
-AC_OUTPUT(Makefile)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [3.5.3.2])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES(Makefile)
END
cat > Makefile.am << 'END'
: > ChangeLog
: > THANKS
-$ACLOCAL || exit 1
-$AUTOMAKE --gnits && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails --gnits
+grep 'configure.in:.*3\.5\.3\.2' stderr
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
# 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.
END
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep 'configure.in:2:.*no-installman' stderr
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
. ./defs || exit 1
+set -e
+
rm -f mkinstalldirs
: > Makefile.am
-$ACLOCAL || exit 1
-$AUTOMAKE > out 2>&1 && exit 1
-
-grep mkinstalldirs out
+$ACLOCAL
+AUTOMAKE_fails
+grep 'required.*mkinstalldirs' stderr
#! /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.
#
# 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.
: > joe.l
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep AM_PROG_LEX stderr
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB
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
# 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.
# 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
$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
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
# 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
# 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.
END
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep 'Makefile.am:3:.*LIBOBJS' stderr
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
END
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep AC_PROG_RANLIB stderr
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
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
#!/bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
END
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep AC_PROG_LIBTOOL stderr
#!/bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
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
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
END
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep AM_PATH_LISPDIR stderr
END
$ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep AM_PATH_LISPDIR stderr
echo 3
END
$ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep AM_PATH_LISPDIR stderr
# 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.
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
: > 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
#! /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.
#
# 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.
: > Makefile.am
$ACLOCAL
-$AUTOMAKE > output 2>&1 && exit 1
-cat output
-grep 'found or specified' output
+AUTOMAKE_fails
+grep 'found or specified' stderr
$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
#!/bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
EOF
$ACLOCAL
-$AUTOMAKE -Wportability && exit 1
-exit 0
+AUTOMAKE_fails -Wportability
+grep 'Makefile.am:4:.*%' stderr
#!/bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
EOF
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep '%.*pattern.*rules' stderr
# No error otherwise.
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
echo 'AM_CONDITIONAL(CHECK, true)' >> configure.in
cat > Makefile.am << 'END'
INCLUDES += def
END
-$ACLOCAL || exit 1
-$AUTOMAKE 2>stderr && exit 1
-
-cat stderr # for debugging
+$ACLOCAL
+AUTOMAKE_fails
# We expect the following diagnostic:
#
# 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
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB
: > q.c
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:3:.*AR' stderr
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat >>configure.in <<EOF
AM_CONDITIONAL(COND1, true)
AM_CONDITIONAL(COND2, true)
B += dd
END
-$ACLOCAL || exit 1
-$AUTOMAKE 2>stderr && exit 1
-
-cat stderr # for debugging
+$ACLOCAL
+AUTOMAKE_fails
# We expect the following diagnostic:
#
# 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
#! /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.
#
# 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.
required=libtoolize
. ./defs || exit 1
+set -e
+
cat > configure.in << 'END'
AC_INIT(Makefile.am)
AM_INIT_AUTOMAKE(hello,0.23)
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
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat > Makefile.am << 'END'
bin_PROGRAMS = @programs@
END
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'EXTRA_PROGRAMS' stderr
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
echo AC_PROG_CC >> configure.in
cat > Makefile.am << 'END'
EXTRA_PROGRAMS = joe @more@
END
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep EXTRA_PROGRAMS stderr
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
END
$ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
echo 2
END
$ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
END
$ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
END
$ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
END
$ACLOCAL
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat > configure.in << 'END'
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
foo = $(bin_PROGRAMS)
END
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:.*bin_PROGRAMS.*recursively defined' stderr
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
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
#! /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.
#
# 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.
: > mountlist.c
$ACLOCAL
-$AUTOMAKE 2>err && exit 1
-cat err
-$FGREP CC err
-$FGREP CXX err
+AUTOMAKE_fails
+$FGREP CC stderr
+$FGREP CXX stderr
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
END
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
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_CXX
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
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat > Makefile.am << 'END'
bin_PROGRAMS = zardoz foo
zardoz_SOURCES = x.c
boo_SOURCES = y.c
END
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:3:.*boo' stderr
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
echo AC_PROG_CC >> configure.in
cat > Makefile.am << 'END'
qardoz_LDADD = -ljoe
END
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:3:.*qardoz' stderr
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
END
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
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
END
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
#! /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.
#
# 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.
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
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep 'obj.*BSD' stderr
cat >Makefile.am <<EOF
DIST_SUBDIRS = obj
EOF
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
grep 'obj.*BSD' stderr
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat > configure.in << 'END'
AC_INIT(fakelib.c)
AM_INIT_AUTOMAKE(fakelib,0.0)
@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
# 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.
$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
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
rm -f install-sh
rm -f mkinstalldirs
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
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat > Makefile.am << 'END'
foo = q \
lib_LTLIBRARIES = foo.la
END
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:2:.*blank line' stderr
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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.
$ACLOCAL
$AUTOCONF
-$AUTOMAKE -a 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails -a
grep 'redefinition.*ctags' stderr
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
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
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = 9.9x
END
-$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'Makefile.am:1:.*Automake 9.9x' stderr
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
set -e
-
cat >>configure.in <<END
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
END
$ACLOCAL
-$AUTOMAKE 2>stderr && exit 1
-cat stderr
+AUTOMAKE_fails
# The expected diagnostic is
# Makefile.am:3: unused variable: `foo_SOURCES'
# sub/Makefile.am:2: `INCLUDES' is the old name for `AM_CPPFLAGS'
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat > Makefile.am << 'END'
bin_PROGRAMS = zardoz
zardoz_SOURCES = z.c x/z.c
: > x/z.c
$ACLOCAL || exit 1
-$AUTOMAKE && exit 1
-exit 0
+AUTOMAKE_fails
+$FGREP 'z.$(OBJEXT)' stderr
#! /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.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING. If not, write to
+# along with Automake; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
. ./defs || exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_YACC
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+$ACLOCAL
+$AUTOMAKE
# If zardoz.h IS mentioned, fail
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
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
+: