summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/ac-output-old.tap25
-rwxr-xr-xt/acloca14.sh2
-rwxr-xr-xt/acloca14b.sh108
-rwxr-xr-xt/acloca22.sh12
-rwxr-xr-xt/acloca22b.sh59
-rwxr-xr-xt/aclocal-acdir.sh26
-rwxr-xr-xt/aclocal-amflags.sh69
-rwxr-xr-xt/aclocal-autoconf-version-check.sh (renamed from t/missing6.sh)0
-rwxr-xr-xt/aclocal-macrodir.tap161
-rwxr-xr-xt/aclocal-path-install.sh2
-rwxr-xr-xt/aclocal-path-precedence.sh2
-rwxr-xr-xt/aclocal-print-acdir.sh3
-rwxr-xr-xt/aclocal4.sh4
-rwxr-xr-xt/aclocal5.sh16
-rwxr-xr-xt/aclocal6.sh4
-rwxr-xr-xt/acsilent.sh7
-rwxr-xr-xt/add-missing.tap11
-rwxr-xr-xt/am-missing-prog.sh4
-rwxr-xr-xt/autohdr2.sh30
-rwxr-xr-xt/autohdrdry.sh2
-rw-r--r--t/ax/am-test-lib.sh17
-rw-r--r--t/ax/extract-testsuite-summary.pl4
-rw-r--r--t/ax/tap-summary-aux.sh3
-rw-r--r--t/ax/testsuite-summary-checks.sh6
-rwxr-xr-xt/backcompat-acout.sh (renamed from t/backcompat4.sh)0
-rwxr-xr-xt/backcompat3.sh11
-rwxr-xr-xt/backcompat5.sh126
-rwxr-xr-xt/backcompat6.sh6
-rwxr-xr-xt/check-exported-srcdir.sh2
-rwxr-xr-xt/check-no-test-driver.sh8
-rwxr-xr-xt/check-subst.sh2
-rwxr-xr-xt/check-tests-in-builddir.sh8
-rwxr-xr-xt/check8.sh2
-rwxr-xr-xt/color-tests-opt.sh (renamed from t/version.sh)30
-rwxr-xr-xt/color-tests.sh (renamed from t/color.sh)1
-rwxr-xr-xt/color-tests2.sh (renamed from t/color2.sh)18
-rwxr-xr-xt/comment7.sh2
-rwxr-xr-xt/compile_f_c_cxx.sh6
-rwxr-xr-xt/confh-subdir-clean.sh2
-rwxr-xr-xt/confh.sh2
-rwxr-xr-xt/confh4.sh2
-rwxr-xr-xt/confh6.sh2
-rwxr-xr-xt/confh7.sh2
-rwxr-xr-xt/confh8.sh2
-rwxr-xr-xt/confsub.sh2
-rwxr-xr-xt/cygnus-dependency-tracking.sh74
-rwxr-xr-xt/cygnus-imply-foreign.sh60
-rwxr-xr-xt/cygnus-no-dist.sh86
-rwxr-xr-xt/cygnus-no-installinfo.sh55
-rwxr-xr-xt/cygnus-no-more.sh (renamed from t/cygnus-deprecation.sh)30
-rwxr-xr-xt/depend5.sh5
-rwxr-xr-xt/dirlist.sh4
-rwxr-xr-xt/dirlist2.sh9
-rwxr-xr-xt/dist-auxdir-many-subdirs.sh5
-rwxr-xr-xt/distcom4.sh3
-rwxr-xr-xt/dollarvar.sh11
-rwxr-xr-xt/ext.sh7
-rwxr-xr-xt/flavor.sh17
-rwxr-xr-xt/gettext-macros.sh4
-rwxr-xr-xt/help-multilib.sh34
-rwxr-xr-xt/help-silent.sh19
-rwxr-xr-xt/instdir-texi.sh2
-rwxr-xr-xt/java-compile-run-flat.sh4
-rwxr-xr-xt/java-compile-run-nested.sh10
-rwxr-xr-xt/lisp-flags.sh (renamed from t/version2.sh)38
-rwxr-xr-xt/lisp-loadpath.sh67
-rwxr-xr-xt/lisp-subdir-mix.sh96
-rwxr-xr-xt/lisp-subdir.sh80
-rwxr-xr-xt/lisp-subdir2.sh78
-rwxr-xr-xt/lisp3.sh10
-rwxr-xr-xt/lisp4.sh1
-rwxr-xr-xt/lisp5.sh1
-rwxr-xr-xt/lisp6.sh5
-rwxr-xr-xt/lisp7.sh2
-rwxr-xr-xt/lisp8.sh4
-rwxr-xr-xt/lispdry.sh4
-rw-r--r--t/list-of-tests.mk66
-rwxr-xr-xt/maken3.sh10
-rwxr-xr-xt/man4.sh105
-rwxr-xr-xt/man6.sh4
-rwxr-xr-xt/missing-version-mismatch.sh (renamed from t/missing2.sh)54
-rwxr-xr-xt/missing.sh66
-rwxr-xr-xt/missing3.sh50
-rwxr-xr-xt/missing5.sh64
-rwxr-xr-xt/mkdirp-deprecation.sh40
-rwxr-xr-xt/multlib.sh162
-rwxr-xr-xt/nodef.sh2
-rwxr-xr-xt/nodep2.sh7
-rwxr-xr-xt/objc-flags.sh2
-rwxr-xr-xt/objc-megademo.sh10
-rwxr-xr-xt/objcxx-basic.sh11
-rwxr-xr-xt/objcxx-deps.sh10
-rwxr-xr-xt/objcxx-flags.sh13
-rwxr-xr-xt/objcxx-minidemo.sh10
-rwxr-xr-xt/obsolete.sh57
-rwxr-xr-xt/parallel-tests-driver-install.sh47
-rwxr-xr-xt/parallel-tests-dry-run-1.sh2
-rwxr-xr-xt/parallel-tests-dry-run-2.sh2
-rwxr-xr-xt/parallel-tests-interrupt.tap2
-rwxr-xr-xt/parallel-tests-no-color-in-log.sh2
-rwxr-xr-xt/parallel-tests-reset-term.sh2
-rwxr-xr-xt/parallel-tests-subdir.sh2
-rwxr-xr-xt/parallel-tests2.sh146
-rwxr-xr-xt/perf/testsuite-summary.sh2
-rwxr-xr-xt/primary-prefix-invalid-couples.tap1
-rwxr-xr-xt/primary-prefix-valid-couples.sh1
-rwxr-xr-xt/recurs-user-deeply-nested.sh97
-rwxr-xr-xt/recurs-user-indir.sh99
-rwxr-xr-xt/recurs-user-keep-going.sh95
-rwxr-xr-xt/recurs-user-many.sh73
-rwxr-xr-xt/recurs-user-no-subdirs.sh (renamed from t/silent-amopts.sh)36
-rwxr-xr-xt/recurs-user-no-top-level.sh (renamed from t/cygnus-check-without-all.sh)38
-rwxr-xr-xt/recurs-user-override.sh68
-rwxr-xr-xt/recurs-user-phony.sh (renamed from t/cygnus-requires-maintainer-mode.sh)47
-rwxr-xr-xt/recurs-user-wrap.sh (renamed from t/clean2.sh)65
-rwxr-xr-xt/recurs-user.sh81
-rwxr-xr-xt/recurs-user2.sh103
-rwxr-xr-xt/remake-aclocal-version-mismatch.sh (renamed from t/missing4.sh)0
-rwxr-xr-xt/remake-include-aclocal.sh4
-rwxr-xr-xt/remake-macrodir.sh83
-rwxr-xr-xt/remake-makefile-intree.sh12
-rwxr-xr-xt/remake-makefile-vpath.sh12
-rwxr-xr-xt/remake-recurs-user.sh89
-rwxr-xr-xt/remake-subdir3.sh2
-rwxr-xr-xt/req.sh9
-rwxr-xr-xt/silent-configsite.sh12
-rwxr-xr-xt/silent-lex.sh1
-rwxr-xr-xt/silent-many-gcc.sh1
-rwxr-xr-xt/silent-many-generic.sh1
-rwxr-xr-xt/silent-nowarn.sh44
-rwxr-xr-xt/silent-obsolescent-warns.sh71
-rwxr-xr-xt/silent-yacc-headers.sh1
-rwxr-xr-xt/silent-yacc.sh1
-rwxr-xr-xt/silent.sh1
-rwxr-xr-xt/silent2.sh1
-rwxr-xr-xt/silent3.sh1
-rwxr-xr-xt/silent4.sh1
-rwxr-xr-xt/silent6.sh2
-rwxr-xr-xt/silent7.sh14
-rwxr-xr-xt/silent8.sh7
-rwxr-xr-xt/silent9.sh1
-rwxr-xr-xt/silentcxx-gcc.sh1
-rwxr-xr-xt/silentcxx.sh1
-rwxr-xr-xt/silentf77.sh1
-rwxr-xr-xt/silentf90.sh1
-rwxr-xr-xt/stamph2.sh7
-rwxr-xr-xt/subdir-add2-pr46.sh4
-rwxr-xr-xt/subpkg.sh10
-rwxr-xr-xt/subpkg2.sh10
-rwxr-xr-xt/tap-doc2.sh2
-rwxr-xr-xt/tap-realtime.sh2
-rwxr-xr-xt/test-driver-is-distributed.sh38
-rwxr-xr-xt/test-metadata-global-log.sh2
-rwxr-xr-xt/tests-environment-backcompat.sh2
-rwxr-xr-xt/txinfo-no-clutter.sh89
-rwxr-xr-xt/txinfo13.sh2
-rwxr-xr-xt/txinfo21.sh19
-rwxr-xr-xt/txinfo23.sh2
-rwxr-xr-xt/txinfo24.sh2
-rwxr-xr-xt/txinfo25.sh2
-rwxr-xr-xt/txinfo28.sh2
-rwxr-xr-xt/txinfo30.sh63
-rwxr-xr-xt/txinfo33.sh2
-rwxr-xr-xt/txinfo5.sh38
-rwxr-xr-xt/txinfo5b.sh42
-rwxr-xr-xt/var-recurs.sh (renamed from t/recurs.sh)2
-rwxr-xr-xt/var-recurs2.sh (renamed from t/recurs2.sh)2
-rwxr-xr-xt/vtexi4.sh2
168 files changed, 2042 insertions, 2071 deletions
diff --git a/t/ac-output-old.tap b/t/ac-output-old.tap
index e45fb5f28..a19691a49 100755
--- a/t/ac-output-old.tap
+++ b/t/ac-output-old.tap
@@ -24,8 +24,6 @@ plan_ 22
rm -f configure.ac depcomp # Not required.
-AUTOMAKE="$AUTOMAKE -Wno-obsolete"
-
# -----------------------------------------------------------------------
# Test for bug reported by François Pinard.
@@ -54,18 +52,15 @@ acoutbs_check ()
}
acoutbs_check 1 << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutbs1], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT(Makefile \
zot)
END
acoutbs_check 2 << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_ARG_PROGRAM
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
+AC_INIT([acoutbs2], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT(\
Makefile \
zot
@@ -85,8 +80,8 @@ mkdir acoutnoq
cd acoutnoq
cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutnoq], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT(Makefile, [true])
END
@@ -107,8 +102,8 @@ mkdir acoutpt
cd acoutpt
cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutpt], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT([Makefile], [true])
END
@@ -163,8 +158,8 @@ mkdir acoutqnl
cd acoutqnl
cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutqnl], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT([Makefile],
[echo zardoz has spoken])
END
diff --git a/t/acloca14.sh b/t/acloca14.sh
index eb9105dde..cc6521441 100755
--- a/t/acloca14.sh
+++ b/t/acloca14.sh
@@ -20,6 +20,7 @@
. ./defs || exit 1
cat >> configure.ac << 'END'
+AC_CONFIG_MACRO_DIR([defs])
AM_PROG_LIBTOOL
AC_OUTPUT
END
@@ -45,7 +46,6 @@ echo 'AC_DEFUN([SOMETHING_ELSE])' >defs/e.m4
echo 'AC_DEFUN([ANOTHER_MACRO])' >defs/f.m4
cat >>Makefile.am<<\EOF
-ACLOCAL_AMFLAGS = -I defs
testdist1: distdir
test -f $(distdir)/acinclude.m4
test -f $(distdir)/a.m4
diff --git a/t/acloca14b.sh b/t/acloca14b.sh
new file mode 100755
index 000000000..eb9105dde
--- /dev/null
+++ b/t/acloca14b.sh
@@ -0,0 +1,108 @@
+#! /bin/sh
+# Copyright (C) 2004-2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure m4_included files are also scanned for definitions.
+# Report from Phil Edwards.
+
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AM_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+echo 'm4_include([a.m4])' > acinclude.m4
+echo 'm4_include([b.m4])' > a.m4
+
+cat >b.m4 <<EOF
+m4_include([c.m4])
+AC_DEFUN([AM_PROG_LIBTOOL],
+[AC_REQUIRE([SOMETHING])dnl
+AC_REQUIRE([SOMETHING_ELSE])dnl
+])
+
+AC_DEFUN([SOMETHING])
+EOF
+
+echo 'm4_include([d.m4])' > c.m4
+echo 'AC_DEFUN([SOMETHING_ELSE])' >d.m4
+
+mkdir defs
+echo 'AC_DEFUN([SOMETHING_ELSE])' >defs/e.m4
+echo 'AC_DEFUN([ANOTHER_MACRO])' >defs/f.m4
+
+cat >>Makefile.am<<\EOF
+ACLOCAL_AMFLAGS = -I defs
+testdist1: distdir
+ test -f $(distdir)/acinclude.m4
+ test -f $(distdir)/a.m4
+ test -f $(distdir)/b.m4
+ test -f $(distdir)/c.m4
+ test -f $(distdir)/d.m4
+ test ! -d $(distdir)/defs
+testdist2: distdir
+ test -f $(distdir)/acinclude.m4
+ test -f $(distdir)/a.m4
+ test -f $(distdir)/b.m4
+ test -f $(distdir)/c.m4
+ test -f $(distdir)/d.m4
+ test ! -f $(distdir)/defs/e.m4
+ test -f $(distdir)/defs/f.m4
+EOF
+
+$ACLOCAL -I defs
+
+$FGREP acinclude.m4 aclocal.m4
+# None of the following macro should be included. acinclude.m4
+# includes the first four, and the last two are not needed at all.
+$FGREP a.m4 aclocal.m4 && exit 1
+$FGREP b.m4 aclocal.m4 && exit 1
+$FGREP c.m4 aclocal.m4 && exit 1
+$FGREP d.m4 aclocal.m4 && exit 1
+$FGREP defs/e.m4 aclocal.m4 && exit 1
+$FGREP defs/f.m4 aclocal.m4 && exit 1
+
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE testdist1
+
+cp aclocal.m4 aclocal.old
+$sleep
+echo 'AC_DEFUN([FOO], [ANOTHER_MACRO])' >> c.m4
+$MAKE
+# Because c.m4 has changed, aclocal.m4 must have been rebuilt.
+is_newest aclocal.m4 aclocal.old
+# However, since FOO is not used, f.m4 should not be included
+# and the contents of aclocal.m4 should remain the same
+diff aclocal.m4 aclocal.old
+
+# If FOO where to be used, that would be another story, of course:
+# f.m4 should be included
+$sleep
+echo FOO >> configure.ac
+$MAKE
+$FGREP defs/f.m4 aclocal.m4
+$MAKE testdist2
+
+# Make sure aclocal diagnose missing included files with correct 'file:line:'.
+rm -f b.m4
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
+cat stderr >&2
+grep 'a\.m4:1: .*b\.m4.*does not exist' stderr
+
+:
diff --git a/t/acloca22.sh b/t/acloca22.sh
index 159fbcdb5..ea76579d9 100755
--- a/t/acloca22.sh
+++ b/t/acloca22.sh
@@ -21,24 +21,27 @@
. ./defs || exit 1
cat >>configure.ac <<EOF
+AC_CONFIG_MACRO_DIR([.])
FOO
AC_OUTPUT
EOF
+
cat >foo.m4 <<EOF
AC_DEFUN([FOO], [AC_SUBST([GREPFOO])])
EOF
+
cat >bar.m4 <<EOF
AC_DEFUN([BAR], [AC_SUBST([GREPBAR])])
EOF
-cat >Makefile.am <<EOF
-ACLOCAL_AMFLAGS = -I .
-EOF
-$ACLOCAL -I .
+: >Makefile.am
+
+$ACLOCAL
$AUTOMAKE
$AUTOCONF
./configure
+
$MAKE
grep GREPFOO Makefile
grep GREPBAR Makefile && exit 1
@@ -46,6 +49,7 @@ grep GREPBAR Makefile && exit 1
sed 's/FOO/BAR/' < configure.ac > t
mv -f t configure.ac
rm -f foo.m4
+
$MAKE
grep GREPFOO Makefile && exit 1
grep GREPBAR Makefile
diff --git a/t/acloca22b.sh b/t/acloca22b.sh
new file mode 100755
index 000000000..0317b120c
--- /dev/null
+++ b/t/acloca22b.sh
@@ -0,0 +1,59 @@
+#! /bin/sh
+# Copyright (C) 2007-2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure the "deleted header file" issue is fixed wrt. aclocal.m4
+# dependencies.
+# NOTE: this test works by using the obsolete 'ACLOCAL_AMFLAGS' make
+# variable; see sister test 'acloca22.test' for a modern equivalent.
+
+. ./defs || exit 1
+
+cat >>configure.ac <<EOF
+FOO
+AC_OUTPUT
+EOF
+
+cat >foo.m4 <<EOF
+AC_DEFUN([FOO], [AC_SUBST([GREPFOO])])
+EOF
+
+cat >bar.m4 <<EOF
+AC_DEFUN([BAR], [AC_SUBST([GREPBAR])])
+EOF
+
+cat >Makefile.am <<EOF
+ACLOCAL_AMFLAGS = -I .
+EOF
+
+$ACLOCAL -I .
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+
+$MAKE
+grep GREPFOO Makefile
+grep GREPBAR Makefile && exit 1
+
+sed 's/FOO/BAR/' < configure.ac > t
+mv -f t configure.ac
+rm -f foo.m4
+
+$MAKE
+grep GREPFOO Makefile && exit 1
+grep GREPBAR Makefile
+
+:
diff --git a/t/aclocal-acdir.sh b/t/aclocal-acdir.sh
index abd7857d1..ac5de4cac 100755
--- a/t/aclocal-acdir.sh
+++ b/t/aclocal-acdir.sh
@@ -14,9 +14,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test aclocal's '--acdir', '--automake-acdir' and '--system-acdir'
-# options. Also check that stuff in the automake acdir takes precedence
-# over stuff in the system acdir.
+# Test aclocal's '--automake-acdir' and '--system-acdir' options. Also
+# check that stuff in the automake acdir takes precedence over stuff in
+# the system acdir.
. ./defs || exit 1
@@ -72,24 +72,4 @@ $FGREP 'fake--init--automake' configure
$FGREP 'am--macro' configure
$FGREP 'my--macro' configure && exit 1 # Just to be sure.
-rm -rf autom4te*.cache
-
-# Obsolescent '--acdir' option.
-$ACLOCAL -Wobsolete --acdir am 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep '.*--acdir.*deprecated' stderr
-
-rm -rf autom4te*.cache
-
-$ACLOCAL -Wno-obsolete --acdir am
-$AUTOCONF --force
-$FGREP 'fake--init--automake' configure
-$FGREP 'am--macro' configure
-
-rm -rf autom4te*.cache
-
-$ACLOCAL -Wno-obsolete --acdir sys 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep 'macro .*AM_INIT_AUTOMAKE.* not found' stderr
-
:
diff --git a/t/aclocal-amflags.sh b/t/aclocal-amflags.sh
new file mode 100755
index 000000000..47bf1351a
--- /dev/null
+++ b/t/aclocal-amflags.sh
@@ -0,0 +1,69 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the obsolescent idiom of setting $(ACLOCAL_AMFLAGS) in
+# Makefile.am still works. Remove this test once support for this
+# obsolescent idiom is removed.
+
+. ./defs || exit 1
+
+cat >> configure.ac <<'END'
+MACRO_FOO || AS_EXIT([1])
+AC_OUTPUT
+END
+
+mkdir m4_1 m4_2
+cat > m4_1/foo.m4 <<'END'
+AC_DEFUN([MACRO_FOO], [: > foo])
+END
+cat > m4_2/bar.m4 <<'END'
+AC_DEFUN([MACRO_BAR], [: > bar])
+END
+
+cat > Makefile.am <<'END'
+ACLOCAL_AMFLAGS = -I m4_2 --verbose
+check-local:
+ test ! -r foo
+ test -f bar
+DISTCLEANFILES = bar
+END
+
+$ACLOCAL -I m4_1 >output 2>&1 || { cat output; exit 1; }
+cat output
+grep 'found macro' output && exit 1 # Sanity check.
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+test -f foo
+rm -f foo
+
+# ACLOCAL_AMFLAGS is used in rebuild rules, so trigger them.
+$sleep
+
+sed 's/MACRO_FOO/MACRO_BAR/' configure.ac > t
+mv -f t configure.ac
+
+$MAKE Makefile >output 2>&1 || { cat output; exit 1; }
+cat output
+grep "^aclocal.*:.*found macro.*MACRO_BAR.*m4_2/bar\.m4" output
+grep "macro.*MACRO_FOO" output && exit 1
+test ! -r foo
+test -f bar
+
+$MAKE distcheck
+
+:
diff --git a/t/missing6.sh b/t/aclocal-autoconf-version-check.sh
index 8e02ae999..8e02ae999 100755
--- a/t/missing6.sh
+++ b/t/aclocal-autoconf-version-check.sh
diff --git a/t/aclocal-macrodir.tap b/t/aclocal-macrodir.tap
new file mode 100755
index 000000000..c35d9e002
--- /dev/null
+++ b/t/aclocal-macrodir.tap
@@ -0,0 +1,161 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Several tests on the use of the m4 macro AC_CONFIG_MACRO_DIR with
+# aclocal.
+
+am_create_testdir=empty
+. ./defs || exit 1
+
+plan_ later
+
+ocwd=$(pwd) || fatal_ "getting current working directory"
+ACLOCAL_PATH=; unset ACLOCAL_PATH
+
+#
+# General utility functions and variables.
+#
+# TODO: These should maybe be refactored, generalized and
+# moved into 't/ax/tap-functions.sh' ...
+#
+
+tcount=0
+r=invalid
+description=''
+directive=''
+
+test_begin ()
+{
+ if test -n "$description"; then
+ fatal_ "'test_begin' called, but another test seems active already"
+ else
+ r=ok
+ description=$1
+ echo "$description" > README.txt
+ shift
+ fi
+ tcount=$(($tcount + 1)) && test $tcount -gt 0 \
+ || fatal_ "failed to bump the test count"
+ mkdir $tcount.d
+ cd $tcount.d
+}
+
+test_end ()
+{
+ if test -z "$description"; then
+ fatal_ "'test_end' called, but no test seems active"
+ else
+ cd "$ocwd" || fatal_ "cannot chdir back to top-level directory"
+ result_ "$r" -D "$directive" -- "$description"
+ # Don't leave directories for successful subtests hanging around.
+ if test -z "$directive" && test "$r" = ok; then
+ rm -rf "$tcount.d" || fatal_ "removing subdir $tcount.d"
+ fi
+ r=invalid directive= description=
+ fi
+}
+
+test_todo () { directive=TODO; }
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIR is honored"
+
+cat > configure.ac <<'END'
+AC_INIT([md], [10.0])
+AC_CONFIG_MACRO_DIR([macro-dir])
+MY_FOO
+END
+
+mkdir macro-dir
+echo 'AC_DEFUN([MY_FOO], [::my::foo::])' > macro-dir/foo.m4
+
+$ACLOCAL \
+ && $FGREP 'm4_include([macro-dir/foo.m4])' aclocal.m4 \
+ && $AUTOCONF \
+ && not $FGREP 'MY_FOO' configure \
+ && $FGREP '::my::foo::' configure \
+ || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIR([foo]) interaction with --install"
+
+cat > configure.ac << 'END'
+AC_INIT([inst], [1.0])
+AC_CONFIG_MACRO_DIR([the-dir])
+THE_MACRO
+END
+
+mkdir sys-dir the-dir
+echo 'AC_DEFUN([THE_MACRO], [:])' > sys-dir/my.m4
+
+test ! -r the-dir/my.m4 \
+ && $ACLOCAL --install --system-acdir ./sys-dir \
+ && diff sys-dir/my.m4 the-dir/my.m4 \
+ || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "'-I' option wins over AC_CONFIG_MACRO_DIR"
+
+cat > configure.ac <<'END'
+AC_INIT([md], [4.6])
+AC_CONFIG_MACRO_DIR([dir1])
+MY_FOO
+END
+
+mkdir dir1 dir2
+echo 'AC_DEFUN([MY_FOO], [::ko::ko::])' > dir1/1.m4
+echo 'AC_DEFUN([MY_FOO], [::ok::ok::])' > dir2/2.m4
+
+$ACLOCAL -I dir2 \
+ && $FGREP 'm4_include([dir2/2.m4])' aclocal.m4 \
+ && not $FGREP 'm4_include([dir1/1.m4])' aclocal.m4 \
+ && $AUTOCONF \
+ && not $FGREP '::ko::ko::' configure \
+ && $FGREP '::ok::ok::' configure \
+ || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIR([foo]) can create directory 'foo'"
+
+cat > configure.ac << 'END'
+AC_INIT([x], [1.0])
+AC_CONFIG_MACRO_DIR([foo])
+MY_MACRO
+END
+
+mkdir acdir
+echo 'AC_DEFUN([MY_MACRO], [:])' > acdir/bar.m4
+
+test ! -d foo \
+ && $ACLOCAL --install --system-acdir ./acdir \
+ && diff acdir/bar.m4 foo/bar.m4 \
+ || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+:
diff --git a/t/aclocal-path-install.sh b/t/aclocal-path-install.sh
index 4ed1a2c27..ccad30b20 100755
--- a/t/aclocal-path-install.sh
+++ b/t/aclocal-path-install.sh
@@ -41,7 +41,7 @@ END
# in a directory specified in ACLOCAL_PATH.
$ACLOCAL --install 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
-grep ' no -I was supplied' stderr
+grep 'impossible without -I .* nor AC_CONFIG_MACRO_DIR' stderr
test ! -e pdir/foo.m4
# The '--install' option should cause a required macro found in a
diff --git a/t/aclocal-path-precedence.sh b/t/aclocal-path-precedence.sh
index 81eee9886..220533ef4 100755
--- a/t/aclocal-path-precedence.sh
+++ b/t/aclocal-path-precedence.sh
@@ -21,7 +21,7 @@ am_create_testdir=empty
cat > configure.ac << 'END'
AC_INIT([foo], [1.0])
-AM_INIT_AUTOMAKE([parallel-tests])
+AM_INIT_AUTOMAKE
FOO_MACRO
BAR_MACRO
AC_PROG_LIBTOOL
diff --git a/t/aclocal-print-acdir.sh b/t/aclocal-print-acdir.sh
index d057d826e..c5a8eb5ea 100755
--- a/t/aclocal-print-acdir.sh
+++ b/t/aclocal-print-acdir.sh
@@ -22,9 +22,6 @@ am_create_testdir=empty
$ACLOCAL --print-ac-dir
test "$($ACLOCAL --print-ac-dir)" = "$am_system_acdir"
-$ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir
-test "$($ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir)" = foo
-
$ACLOCAL --system-acdir /bar --print-ac-dir
test "$($ACLOCAL --system-acdir /bar --print-ac-dir)" = /bar
diff --git a/t/aclocal4.sh b/t/aclocal4.sh
index feae3ec17..e542c5326 100755
--- a/t/aclocal4.sh
+++ b/t/aclocal4.sh
@@ -21,6 +21,7 @@ required=cc
. ./defs || exit 1
cat >>configure.ac <<EOF
+AC_CONFIG_MACRO_DIR([m4])
AC_PROG_RANLIB
AM_PROG_AR
AC_PROG_CC
@@ -46,7 +47,6 @@ EOF
cat >Makefile.am <<'EOF'
SUBDIRS = lib
EXTRA_DIST = m4/mymacro.m4
-ACLOCAL_AMFLAGS = -I m4
check-foo: distdir
test -f $(distdir)/lib/foo.c
test -f $(distdir)/lib/bar.c
@@ -56,7 +56,7 @@ check-not-foo: distdir
test -f $(distdir)/lib/bar.c
EOF
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
./configure
diff --git a/t/aclocal5.sh b/t/aclocal5.sh
index 040666162..a33798699 100755
--- a/t/aclocal5.sh
+++ b/t/aclocal5.sh
@@ -20,23 +20,23 @@
. ./defs || exit 1
cat >> configure.ac << 'END'
-AM_TEST([GREPME])
+AC_CONFIG_MACRO_DIR([m4])
+FOO_TEST([GREPME])
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
END
cat > Makefile.am << 'END'
SUBDIRS = sub
-ACLOCAL_AMFLAGS = -I m4
END
mkdir sub
: > sub/Makefile.am
mkdir m4
-echo 'AC_DEFUN([AM_TEST], [echo $@])' > m4/moredefs.m4
+echo 'AC_DEFUN([FOO_TEST], [echo $@])' > m4/moredefs.m4
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE --copy --add-missing
./configure
@@ -44,10 +44,10 @@ $MAKE
# Update an aclocal.m4 dependency, then make sure all Makefiles are
# updated, even from a sub-directory. Check that AU_ALIAS is
-# recognized. Change the definition of AM_TEST to check that its new
+# recognized. Change the definition of FOO_TEST to check that its new
# definition is used.
$sleep # Modified configure dependencies must be newer than config.status.
-echo 'AU_ALIAS([AM_TEST], [AC_SUBST])' > m4/moredefs.m4
+echo 'AU_ALIAS([FOO_TEST], [AC_SUBST])' > m4/moredefs.m4
cd sub
$MAKE
cd ..
@@ -58,10 +58,10 @@ grep GREPME sub/Makefile
$MAKE distdir
test -f $me-1.0/m4/moredefs.m4
-# Change the definition of AM_TEST to check that its new definition is
+# Change the definition of FOO_TEST to check that its new definition is
# used. Check that AC_DEFUN_ONCE is caught.
$sleep # Modified configure dependencies must be newer than config.status.
-echo 'AC_DEFUN_ONCE([AM_TEST], [AC_SUBST(__$1__)])' > m4/moredefs.m4
+echo 'AC_DEFUN_ONCE([FOO_TEST], [AC_SUBST(__$1__)])' > m4/moredefs.m4
$MAKE
grep 'm4/moredefs\.m4' aclocal.m4
grep '__GREPME__' configure
diff --git a/t/aclocal6.sh b/t/aclocal6.sh
index dc6b38db3..80c918a85 100755
--- a/t/aclocal6.sh
+++ b/t/aclocal6.sh
@@ -22,12 +22,12 @@
cat >> configure.ac << 'END'
SOME_DEFS
AC_CONFIG_FILES([sub/Makefile])
+AC_CONFIG_MACRO_DIR([m4])
AC_OUTPUT
END
cat > Makefile.am << 'END'
SUBDIRS = sub
-ACLOCAL_AMFLAGS = -I m4
END
mkdir sub
@@ -37,7 +37,7 @@ mkdir m4
echo 'AC_DEFUN([SOME_DEFS], [])' > m4/somedefs.m4
echo 'AC_DEFUN([MORE_DEFS], [AC_SUBST([GREPME])])' > m4/moredefs.m4
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE --copy --add-missing
diff --git a/t/acsilent.sh b/t/acsilent.sh
index 18f18ff92..92c43002a 100755
--- a/t/acsilent.sh
+++ b/t/acsilent.sh
@@ -19,14 +19,13 @@
. ./defs || exit 1
cat >configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
AM_INIT_GUILE_MODULE
EOF
cat > acinclude.m4 << 'END'
-AC_DEFUN([AM_INIT_GUILE_MODULE],[
-. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AC_DEFUN([AM_INIT_GUILE_MODULE], [
+AM_INIT_AUTOMAKE([dist-xz])
AC_CONFIG_AUX_DIR(..)
module=[$1]
AC_SUBST(module)])
diff --git a/t/add-missing.tap b/t/add-missing.tap
index c47382b5f..f15657acb 100755
--- a/t/add-missing.tap
+++ b/t/add-missing.tap
@@ -343,17 +343,6 @@ rm -f foo.texi
check_ <<'END'
== Name ==
-elisp-comp
-== Files ==
-elisp-comp
-== configure.ac ==
-AM_PATH_LISPDIR
-== Makefile.am ==
-lisp_LISP = foo.el
-END
-
-check_ <<'END'
-== Name ==
py-compile
== Files ==
py-compile
diff --git a/t/am-missing-prog.sh b/t/am-missing-prog.sh
index 6368db5ba..e16529dba 100755
--- a/t/am-missing-prog.sh
+++ b/t/am-missing-prog.sh
@@ -51,13 +51,11 @@ o = $@-stdout
e = $@-stderr
debug_info = grep . $@-stdout $@-stderr
-status_is = $(debug_info); echo $@: st=$$st; : test $$st -eq
+status_is = $(debug_info); echo $@: st=$$st; test $$st -eq
w_mis = 'am-none-none' is needed, and is missing on your system
w_old = 'am-exit-63' is needed, and is probably too old
-# FIXME: make this test stricter w.r.t. the exit statuses once
-# FIXME: we are merged to master!
test1:
st=0; $(NO_SUCH_COMMAND) >$o 2>$e || st=$$?; $(status_is) 127
grep "^WARNING: $(w_mis)" $e
diff --git a/t/autohdr2.sh b/t/autohdr2.sh
deleted file mode 100755
index 292a800bd..000000000
--- a/t/autohdr2.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2002-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
-
-. ./defs || exit 1
-
-cat >>configure.ac <<EOF
-AM_CONFIG_HEADER([thisfile.h])
-EOF
-
-: > Makefile.am
-
-$ACLOCAL
-$AUTOHEADER
-
-test -f thisfile.h.in
diff --git a/t/autohdrdry.sh b/t/autohdrdry.sh
index 3bd474ea0..af6c198d1 100755
--- a/t/autohdrdry.sh
+++ b/t/autohdrdry.sh
@@ -37,6 +37,6 @@ $MAKE
rm -f config.h
$MAKE -n
test -f stamp-h1
-test ! -r config.h
+test ! -e config.h
:
diff --git a/t/ax/am-test-lib.sh b/t/ax/am-test-lib.sh
index e69a9046b..d3351d2d0 100644
--- a/t/ax/am-test-lib.sh
+++ b/t/ax/am-test-lib.sh
@@ -616,13 +616,6 @@ require_tool ()
makedepend -f- \
|| skip_all_ "required program 'makedepend' not available"
;;
- makeinfo-html)
- # Make sure we have makeinfo, and it understands '--html'.
- echo "$me: running makeinfo --html --version"
- makeinfo --html --version \
- || skip_all_ "cannot find a makeinfo program that groks" \
- "the '--html' option"
- ;;
mingw)
uname_s=$(uname -s || echo UNKNOWN)
echo "$me: system name: $uname_s"
@@ -696,12 +689,6 @@ require_tool ()
skip_all_ "TeX is required, but it wasn't found by configure"
fi
;;
- texi2dvi-o)
- # Texi2dvi supports '-o' since Texinfo 4.1.
- echo "$me: running texi2dvi -o /dev/null --version"
- texi2dvi -o /dev/null --version \
- || skip_all_ "required program 'texi2dvi' not available"
- ;;
lex)
test x"$LEX" = x"false" && skip_all_ "lex not found or disabled"
export LEX
@@ -783,9 +770,9 @@ am_setup_testdir ()
{
echo "AC_INIT([$me], [1.0])"
if test x"$am_serial_tests" = x"yes"; then
- echo "AM_INIT_AUTOMAKE"
+ echo "AM_INIT_AUTOMAKE([serial-tests])"
else
- echo "AM_INIT_AUTOMAKE([parallel-tests])"
+ echo "AM_INIT_AUTOMAKE"
fi
echo "AC_CONFIG_FILES([Makefile])"
} >configure.ac || framework_failure_ "creating configure.ac skeleton"
diff --git a/t/ax/extract-testsuite-summary.pl b/t/ax/extract-testsuite-summary.pl
index 28a9c3560..a8b634373 100644
--- a/t/ax/extract-testsuite-summary.pl
+++ b/t/ax/extract-testsuite-summary.pl
@@ -1,6 +1,6 @@
#! /usr/bin/env perl
-# Extract the testsuite summary generated by the parallel-tests harness
-# from the output of "make check".
+# Extract the testsuite summary generated by the parallel testsuite
+# harness from the output of "make check".
# Copyright (C) 2012 Free Software Foundation, Inc.
diff --git a/t/ax/tap-summary-aux.sh b/t/ax/tap-summary-aux.sh
index 156c4ad83..451020cd0 100644
--- a/t/ax/tap-summary-aux.sh
+++ b/t/ax/tap-summary-aux.sh
@@ -29,7 +29,7 @@ fetch_tap_driver
cat > configure.ac <<END
AC_INIT([GNU AutoTAP], [5.12], [bug-automake@gnu.org])
-AM_INIT_AUTOMAKE([parallel-tests])
+AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
END
@@ -89,7 +89,6 @@ if test $use_colors = yes; then
mgn="$esc[0;35m"
brg="$esc[1m"
std="$esc[m"
- echo AUTOMAKE_OPTIONS = color-tests >> Makefile.am
else
red= grn= lgn= blu= mgn= brg= std=
fi
diff --git a/t/ax/testsuite-summary-checks.sh b/t/ax/testsuite-summary-checks.sh
index 54d76cd04..6eafdc971 100644
--- a/t/ax/testsuite-summary-checks.sh
+++ b/t/ax/testsuite-summary-checks.sh
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check the testsuite summary with the parallel-tests harness. This
+# Check the testsuite summary with the parallel test harness. This
# script is meant to be sourced by other test script, so that it can
# be used to check different scenarios (colorized and non-colorized
# testsuite output, packages with and without bug-report addresses,
@@ -28,10 +28,8 @@ case $use_colors in
# Forced colorization should take place also with non-ANSI
# terminals; hence this setting.
TERM=dumb; export TERM
- am_opts='parallel-tests color-tests'
;;
no)
- am_opts='parallel-tests'
;;
*)
fatal_ "invalid use_colors='$use_colors'";;
@@ -39,7 +37,7 @@ esac
cat > configure.ac <<END
AC_INIT([GNU AutoFoo], [7.1], [bug-automake@gnu.org])
-AM_INIT_AUTOMAKE([$am_opts])
+AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
END
diff --git a/t/backcompat4.sh b/t/backcompat-acout.sh
index f2e552bf5..f2e552bf5 100755
--- a/t/backcompat4.sh
+++ b/t/backcompat-acout.sh
diff --git a/t/backcompat3.sh b/t/backcompat3.sh
index f25bd57c0..26ea7d48b 100755
--- a/t/backcompat3.sh
+++ b/t/backcompat3.sh
@@ -76,15 +76,8 @@ diff exp got
### Run 2 ###
cat > configure.ac <<'END'
-dnl: 'AC_INIT' in Autoconf <= 2.63 doesn't have an URL argument.
-dnl: Luckily, 'AC_AUTOCONF_VERSION' and 'm4_version_prereq' are
-dnl: both present in autoconf 2.62, which we require; so that we
-dnl: can at least use the following workaround.
-m4_version_prereq([2.64],
- [AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname],
- [ac_url])],
- [AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname])
- AC_SUBST([PACKAGE_URL], [ac_url])])
+AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname],
+ [ac_url])],
AM_INIT_AUTOMAKE([am_name], [am_version])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff --git a/t/backcompat5.sh b/t/backcompat5.sh
deleted file mode 100755
index caeac07cf..000000000
--- a/t/backcompat5.sh
+++ /dev/null
@@ -1,126 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Backward-compatibility test: try to build and distribute a package
-# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT,
-# and configure.in as autoconf input file.
-# This script can also serve as mild stress-testing for Automake.
-# See also the similar test 'backcompat6.sh'.
-
-am_serial_tests=yes
-am_create_testdir=empty
-. ./defs || exit 1
-
-makefiles='hacky/Makefile src/Makefile data/Makefile tests/Makefile'
-
-# Yuck!
-cat > configure.in <<END
-dnl: Everything here is *deliberately* underquoted!
-AC_INIT(src/foo.input)
-AM_INIT_AUTOMAKE(foo, 1.0)
-AC_CONFIG_FILES(Makefile:mkfile.in)
-AC_OUTPUT($makefiles)
-END
-
-distdir=foo-1.0
-
-cat > mkfile.am <<'END'
-SUBDIRS = src data tests hacky
-installcheck-local:
- grep DataDataData $(DESTDIR)$(prefix)/data/$(PACKAGE)-$(VERSION)/bar
-END
-
-mkdir hacky src tests data
-
-echo 'This is a dummy package' > README
-
-cat > src/foo.input <<'END'
-#!sh
-echo Zardoz
-END
-
-cat > tests/a.test <<'END'
-#!/bin/sh
-"$srcdir/../src/foo" | grep Zardoz
-END
-chmod a+x tests/a.test
-
-cat > data/bar <<'END'
-line1
-line2
-line3
-END
-
-cat >hacky/Makefile.am <<'END'
-dist-hook:
- find $(top_distdir) -print
- chmod a+rx $(top_distdir)/tests/*.test
-END
-
-cat > src/Makefile.am <<'END'
-dist_bin_SCRIPTS = foo
-foo: foo.input
- sed '1s,^#!.*$$,#!/bin/sh,' $(srcdir)/foo.input >$@
- chmod a+x $@
-EXTRA_DIST = foo.input
-DISTCLEANFILES = foo
-END
-
-cat > data/Makefile.am <<'END'
-nodist_data_DATA = bar
-datadir = $(prefix)/data/$(PACKAGE)-$(VERSION)
-bar:
- echo DataDataData >$@
-distclean-local:
- rm -f bar
-END
-
-cat > tests/Makefile.am <<'END'
-TESTS = a.test
-EXTRA_DIST = $(TESTS)
-END
-
-$ACLOCAL -Wno-obsolete
-$AUTOCONF
-$AUTOMAKE -a -Wno-obsolete
-test -f install-sh
-for f in $makefiles; do mv -f $f.in $f.sav; done
-$AUTOMAKE -Wno-obsolete
-for f in $makefiles; do diff $f.sav $f.in; done
-
-./configure
-ls -l . hacky src data tests # For debugging.
-test ! -e mkfile
-$MAKE
-$MAKE distdir
-test ! -e $distdir/Makefile.in
-test ! -e $distdir/data/bar
-test -f $distdir/src/foo
-diff README $distdir/README
-diff mkfile.in $distdir/mkfile.in
-diff tests/a.test $distdir/tests/a.test
-diff src/foo.input $distdir/src/foo.input
-
-$MAKE check
-$MAKE distcheck
-
-test -f $distdir.tar.gz
-
-chmod a-x tests/a.test
-# dist-hook should take care of making test files executables.
-$MAKE distcheck
-
-:
diff --git a/t/backcompat6.sh b/t/backcompat6.sh
index ee86e3644..bcfd3dc75 100755
--- a/t/backcompat6.sh
+++ b/t/backcompat6.sh
@@ -18,7 +18,7 @@
# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT,
# and 'configure.in' as autconf input file.
# This script can also serve as mild stress-testing for Automake.
-# See also the similar test 'backcompat5.sh'.
+# See also the similar test 'backcompat5.test'.
required=cc
am_create_testdir=empty
@@ -26,7 +26,7 @@ am_create_testdir=empty
# Anyone doing something like this in a real-life package probably
# deserves to be killed.
-cat > configure.in <<'END'
+cat > configure.ac <<'END'
dnl: Everything here is *deliberately* underquoted!
AC_INIT(quux.c)
PACKAGE=nonesuch-zardoz
@@ -98,7 +98,7 @@ $MAKE check
distdir=nonesuch-zardoz-nonesuch-0.1
$MAKE distdir
test -f $distdir/quux.c
-test ! -e $distdir/foo.got
+test ! -f $distdir/foo.got
$MAKE distcheck
diff --git a/t/check-exported-srcdir.sh b/t/check-exported-srcdir.sh
index baa8c4003..ff48a5f1c 100755
--- a/t/check-exported-srcdir.sh
+++ b/t/check-exported-srcdir.sh
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check that the testsuite driver (either with or without the
-# parallel-tests option enabled) exports the 'srcdir' value in the
+# serial-tests option enabled) exports the 'srcdir' value in the
# environment of the tests. This is documented in the manual.
# For gen-testsuite-part: ==> try-with-serial-tests <==
diff --git a/t/check-no-test-driver.sh b/t/check-no-test-driver.sh
index 7df5251f8..bcb2cc927 100755
--- a/t/check-no-test-driver.sh
+++ b/t/check-no-test-driver.sh
@@ -15,13 +15,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check that auxiliary script 'test-driver' doesn't get needlessly
-# installed or referenced when the 'parallel-tests' option is not
-# used.
+# installed or referenced when the 'serial-tests' option is used.
am_serial_tests=yes
. ./defs || exit 1
-echo 'TESTS = foo.test' > Makefile.am
+cat > Makefile.am <<'END'
+AUTOMAKE_OPTIONS = serial-tests
+TESTS = foo.test
+END
$ACLOCAL
diff --git a/t/check-subst.sh b/t/check-subst.sh
index b84762ed7..0b1aedaca 100755
--- a/t/check-subst.sh
+++ b/t/check-subst.sh
@@ -16,7 +16,7 @@
# Check @substituted@ TESTS.
# Note that in this test, we rely on the .test extension for the
-# substituted names: this is necessary for parallel-tests.
+# substituted names: this is necessary for the parallel harness.
# See also sister test 'check-subst-prog.sh'.
# For gen-testsuite-part: ==> try-with-serial-tests <==
diff --git a/t/check-tests-in-builddir.sh b/t/check-tests-in-builddir.sh
index de453d222..6785877c8 100755
--- a/t/check-tests-in-builddir.sh
+++ b/t/check-tests-in-builddir.sh
@@ -54,8 +54,8 @@ chmod a+x bar.test
$MAKE check >out 2>&1 || { cat out; exit 1; }
cat out
-# The simple-tests driver does not strip VPATH components from
-# the name of the test, but the parallel-tests driver should.
+# The serial test driver does not strip VPATH components from
+# the name of the test, but the parallel driver should.
if test x"$am_serial_tests" = x"yes"; then
grep '^PASS: .*foo\.test *$' out
else
@@ -68,8 +68,8 @@ rm -f test-suite.log foo.log bar.log
FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 && { cat out; exit 1; }
cat out
-# The simple-tests driver does not strip VPATH components from
-# the name of the test, but the parallel-tests driver should.
+# The serial test driver does not strip VPATH components from
+# the name of the test, but the parallel driver should.
if test x"$am_serial_tests" = x"yes"; then
grep '^FAIL: .*foo\.test *$' out
else
diff --git a/t/check8.sh b/t/check8.sh
index b968c3a0d..6fcd30ae2 100755
--- a/t/check8.sh
+++ b/t/check8.sh
@@ -75,7 +75,7 @@ grep '^[^X]*PASS.* bar' stdout
grep '^[^X]*PASS.* sub/bar' stdout
grep '^[^X]*FAIL.* baz' stdout
grep 'XFAIL.* sub/baz' stdout
-# 'parallel-tests' should not add circular dependencies.
+# The parallel test driver should cause circular dependencies.
# Look for known warnings from a couple of 'make' implementations.
grep -i 'circular.*dependency' stderr && exit 1
grep -i 'graph cycles' stderr && exit 1
diff --git a/t/version.sh b/t/color-tests-opt.sh
index acfbbe6eb..87d88c9f9 100755
--- a/t/version.sh
+++ b/t/color-tests-opt.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2012 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
@@ -14,28 +14,26 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test to make sure [...] is ok in version number. Report from Jim
-# Meyering.
+# Check that the 'color-tests' option, now active by default, is
+# nonetheless still silently accepted, for backward compatibility.
. ./defs || exit 1
-cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE([sh-utils], [1.12o])
+cat >configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([color-tests])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
END
-: > Makefile.am
+cat >Makefile.am <<END
+AUTOMAKE_OPTIONS = color-tests
+TESTS = foo.test
+END
-# Files required by Gnits.
-: > INSTALL
-: > NEWS
-: > README
-: > COPYING
-: > AUTHORS
-: > ChangeLog
-: > THANKS
+: > test-driver
$ACLOCAL
-$AUTOMAKE --gnits -Wno-obsolete
+$AUTOMAKE
+
+:
diff --git a/t/color.sh b/t/color-tests.sh
index 97063d711..8ccfc3fc3 100755
--- a/t/color.sh
+++ b/t/color-tests.sh
@@ -34,7 +34,6 @@ AC_OUTPUT
END
cat >Makefile.am <<'END'
-AUTOMAKE_OPTIONS = color-tests
TESTS = $(check_SCRIPTS)
check_SCRIPTS = pass fail skip xpass xfail error
XFAIL_TESTS = xpass xfail
diff --git a/t/color2.sh b/t/color-tests2.sh
index 96b644735..d067c9569 100755
--- a/t/color2.sh
+++ b/t/color-tests2.sh
@@ -58,12 +58,14 @@ rm -f expect-check Makefile
# Do the tests.
-cat >>configure.ac <<END
+cat >>configure.ac << 'END'
+if $testsuite_colorized; then :; else
+ AC_SUBST([AM_COLOR_TESTS], [no])
+fi
AC_OUTPUT
END
cat >Makefile.am <<'END'
-AUTOMAKE_OPTIONS = color-tests
TESTS = $(check_SCRIPTS)
check_SCRIPTS = pass fail skip xpass xfail error
XFAIL_TESTS = xpass xfail
@@ -182,6 +184,18 @@ for vpath in false :; do
cat stdout
test_no_color
+ $srcdir/configure testsuite_colorized=false
+
+ TERM=ansi MAKE=$MAKE expect -f $srcdir/expect-make >stdout \
+ || { cat stdout; exit 1; }
+ cat stdout
+ test_no_color
+
+ TERM=ansi MAKE="env AM_COLOR_TESTS=always $MAKE" \
+ expect -f $srcdir/expect-make >stdout || { cat stdout; exit 1; }
+ cat stdout
+ test_color
+
$MAKE distclean
cd $srcdir
diff --git a/t/comment7.sh b/t/comment7.sh
index a4f8d886e..7e45853f5 100755
--- a/t/comment7.sh
+++ b/t/comment7.sh
@@ -54,4 +54,4 @@ sed -n '/^#.*VAR.*COND_FALSE/ {
}' Makefile.in |
grep '@COND_FALSE@VAR = bar'
-:
+:
diff --git a/t/compile_f_c_cxx.sh b/t/compile_f_c_cxx.sh
index 97f8d8476..419d80292 100755
--- a/t/compile_f_c_cxx.sh
+++ b/t/compile_f_c_cxx.sh
@@ -39,8 +39,8 @@ $ACLOCAL
$AUTOMAKE
# Look for the macros at the beginning of rules.
-$FGREP "$tab\$(COMPILE)" Makefile.in
-$FGREP "$tab\$(CXXCOMPILE)" Makefile.in
-$FGREP "$tab\$(F77COMPILE)" Makefile.in
+$FGREP "$tab\$(AM_V_CC)\$(COMPILE)" Makefile.in
+$FGREP "$tab\$(AM_V_CXX)\$(CXXCOMPILE)" Makefile.in
+$FGREP "$tab\$(AM_V_F77)\$(F77COMPILE)" Makefile.in
:
diff --git a/t/confh-subdir-clean.sh b/t/confh-subdir-clean.sh
index 5a942da5b..75024f679 100755
--- a/t/confh-subdir-clean.sh
+++ b/t/confh-subdir-clean.sh
@@ -19,7 +19,7 @@
. ./defs || exit 1
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([sub/config.h:sub/config.hin])
+AC_CONFIG_HEADERS([sub/config.h:sub/config.hin])
AC_OUTPUT
END
diff --git a/t/confh.sh b/t/confh.sh
index c86b63e84..140775773 100755
--- a/t/confh.sh
+++ b/t/confh.sh
@@ -20,7 +20,7 @@
. ./defs || exit 1
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([include/config.h])
+AC_CONFIG_HEADERS([include/config.h])
AC_OUTPUT
END
diff --git a/t/confh4.sh b/t/confh4.sh
index 2f52add86..06ae96fbb 100755
--- a/t/confh4.sh
+++ b/t/confh4.sh
@@ -26,7 +26,7 @@
cat >> configure.ac << 'END'
AC_CONFIG_FILES([include/Makefile])
-AM_CONFIG_HEADER([include/config.h])
+AC_CONFIG_HEADERS([include/config.h])
AC_PROG_CC
END
diff --git a/t/confh6.sh b/t/confh6.sh
index 5479491ca..fa6aab444 100755
--- a/t/confh6.sh
+++ b/t/confh6.sh
@@ -21,7 +21,7 @@
. ./defs || exit 1
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([subdir/config.h])
+AC_CONFIG_HEADERS([subdir/config.h])
AC_OUTPUT
END
diff --git a/t/confh7.sh b/t/confh7.sh
index 86148ac80..dc80ae074 100755
--- a/t/confh7.sh
+++ b/t/confh7.sh
@@ -20,7 +20,7 @@
. ./defs || exit 1
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([config.h two.h])
+AC_CONFIG_HEADERS([config.h two.h])
END
: > Makefile.am
diff --git a/t/confh8.sh b/t/confh8.sh
index 35168e0e6..00013d3e0 100755
--- a/t/confh8.sh
+++ b/t/confh8.sh
@@ -20,7 +20,7 @@
. ./defs || exit 1
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([one.h two.h])
+AC_CONFIG_HEADERS([one.h two.h])
AC_OUTPUT
END
diff --git a/t/confsub.sh b/t/confsub.sh
index 979c66560..de21d51e1 100755
--- a/t/confsub.sh
+++ b/t/confsub.sh
@@ -21,7 +21,7 @@
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
-AM_CONFIG_HEADER([subdir/config.h:subdir/config.hin])
+AC_CONFIG_HEADERS([subdir/config.h:subdir/config.hin])
AC_OUTPUT
END
diff --git a/t/cygnus-dependency-tracking.sh b/t/cygnus-dependency-tracking.sh
deleted file mode 100755
index 6fe7edea5..000000000
--- a/t/cygnus-dependency-tracking.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that cygnus mode disables automatic dependency tracking.
-# And check that this *cannot* be overridden.
-
-required=cc
-. ./defs || exit 1
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-AC_PROG_CC
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-AUTOMAKE_OPTIONS = -Wno-obsolete
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c
-.PHONY: test-nodeps
-test-nodeps:
- test ! -d .deps
- test ! -d _deps
- test ! -d '$(DEPDIR)'
-END
-
-cat > foo.c <<'END'
-#include "bar.h"
-int main ()
-{
- GIVE_BACK 0;
-}
-END
-
-cat > bar.sav <<'END'
-#define GIVE_BACK return
-END
-
-cp bar.sav bar.h
-
-$ACLOCAL
-$AUTOMAKE --include-deps --cygnus --include-deps
-$AUTOCONF
-
-# Unknown options should cause just warnings from configure.
-./configure --enable-dependency-tracking
-$MAKE
-$MAKE test-nodeps
-
-: > bar.h
-$MAKE
-$MAKE test-nodeps
-
-# Sanity check.
-$MAKE clean
-$MAKE >out 2>&1 && { cat out; exit 1; }
-cat out
-# Not all compilers mention the undefined symbol in the error message.
-grep GIVE_BACK out || grep main out
-
-:
diff --git a/t/cygnus-imply-foreign.sh b/t/cygnus-imply-foreign.sh
deleted file mode 100755
index 461265032..000000000
--- a/t/cygnus-imply-foreign.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that 'cygnus' mode imply 'foreign' mode.
-
-. ./defs || exit 1
-
-cat >> configure.ac <<'END'
-# This is *required* in cygnus mode
-AM_MAINTAINER_MODE
-END
-
-$ACLOCAL
-
-: > Makefile.am
-
-# We want complete control automake flags, while honouring the
-# user overrides for $AUTOMAKE.
-AUTOMAKE="$am_original_AUTOMAKE -Wno-obsolete"
-
-# Sanity check: gnu mode must complain about missing files and
-# portability problems.
-AUTOMAKE_fails
-grep 'required file.*README' stderr
-
-# But cygnus mode should imply foreign mode, so no complaints.
-# And cygnus mode should by able to override gnu and gnits modes.
-$AUTOMAKE --cygnus -Werror
-$AUTOMAKE --gnu --cygnus -Werror
-$AUTOMAKE --gnits --cygnus -Werror
-
-# Try again, this time enabling cygnus mode from Makefile.am.
-cp Makefile.am Makefile.sav
-echo 'AUTOMAKE_OPTIONS = gnu cygnus' >> Makefile.am
-$AUTOMAKE -Werror
-mv -f Makefile.sav Makefile.am
-
-# Try again, this time enabling cygnus mode from configure.ac.
-cp configure.ac configure.sav
-sed 's/^AM_INIT_AUTOMAKE/&([gnits cygnus])/' configure.sav >configure.ac
-cmp configure.ac configure.sav && fatal_ 'failed to edit configure.ac'
-
-$ACLOCAL --force
-$AUTOMAKE -Werror
-mv -f configure.sav configure.ac
-
-:
diff --git a/t/cygnus-no-dist.sh b/t/cygnus-no-dist.sh
deleted file mode 100755
index af2c45f59..000000000
--- a/t/cygnus-no-dist.sh
+++ /dev/null
@@ -1,86 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that cygnus mode forbids creation of distribution tarball.
-
-. ./defs || exit 1
-
-echo AM_MAINTAINER_MODE >> configure.ac
-mv -f configure.ac configure.stub
-
-cat configure.stub - > configure.ac <<'END'
-AC_OUTPUT
-END
-
-: > Makefile.am
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --cygnus -Wno-obsolete
-
-./configure
-$MAKE
-
-for target in dist distdir distcheck dist-all dist-gzip; do
- $MAKE -n $target >out 2>&1 && { cat out; exit 1; }
- cat out
- grep $target out
-done
-
-# Now check that cygnus mode in a subdirectory disables
-# distribution-building in that subdirectory.
-
-cat > Makefile.am <<'END'
-SUBDIRS = sub1 sub2
-END
-
-mkdir sub1 sub2
-: > sub1/Makefile.am
-cat > sub2/Makefile.am <<'END'
-# The '-Wall' after 'cygnus' should ensure no warning gets
-# unintentionally disabled. We are particularly interested
-# in override warnings, for when (below) we add the 'distdir'
-# target.
-AUTOMAKE_OPTIONS = cygnus -Wall
-# This is required because the 'cygnus' option is now deprecated.
-AUTOMAKE_OPTIONS += -Wno-obsolete
-END
-
-cat configure.stub - > configure.ac <<'END'
-AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
-AC_OUTPUT
-END
-
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-$MAKE
-cd sub2
-$MAKE -n distdir >out 2>&1 && { cat out; exit 1; }
-grep distdir out
-cd ..
-
-cat >> sub2/Makefile.am <<'END'
-distdir:
-END
-$AUTOMAKE sub2/Makefile
-./config.status sub2/Makefile
-
-$MAKE distdir
-$MAKE dist
-
-:
diff --git a/t/cygnus-no-installinfo.sh b/t/cygnus-no-installinfo.sh
deleted file mode 100755
index 8fe51952b..000000000
--- a/t/cygnus-no-installinfo.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that cygnus mode enables the 'no-installinfo' option.
-
-required=makeinfo
-. ./defs || exit 1
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-info_TEXINFOS = foo.texi
-END
-
-cat > foo.texi <<'END'
-@setfilename foo.info
-END
-
-$ACLOCAL
-# -Wno-override works around a buglet in definition of $(MAKEINFO)
-# in cygnus mode; see also xfailing test 'txinfo5.test'.
-# -Wno-obsolete accounts for the fact that the cygnus mode is now
-# deprecated.
-$AUTOMAKE --cygnus -Wno-override -Wno-obsolete
-$AUTOCONF
-
-cwd=$(pwd) || exit 1
-./configure --prefix="$cwd"/_inst
-$MAKE
-$MAKE install
-test ! -e _inst
-test ! -e foo.info
-test ! -e _inst/share/info
-$MAKE install-info
-ls -l _inst
-test -f foo.info
-test -f _inst/share/info/foo.info
-
-:
diff --git a/t/cygnus-deprecation.sh b/t/cygnus-no-more.sh
index 551d0e66a..66ef57d45 100755
--- a/t/cygnus-deprecation.sh
+++ b/t/cygnus-no-more.sh
@@ -20,37 +20,18 @@
. ./defs || exit 1
-warn_rx='support for Cygnus.*trees.*deprecated'
-
-cat >> configure.ac <<'END'
-AC_PROG_CC
-AM_MAINTAINER_MODE
-END
+warn_rx='support for Cygnus.*trees.*removed'
$ACLOCAL
-$AUTOCONF
-
-: > Makefile.am
-# 'cygnus' option from command line
-$AUTOMAKE --cygnus -Wno-obsolete
-AUTOMAKE_fails --cygnus
-grep "^automake.*: .*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete --cygnus
-grep "^automake.*: .*$warn_rx" stderr
-AUTOMAKE_fails --cygnus -Wnone -Wobsolete
-grep "^automake.*: .*$warn_rx" stderr
-
-rm -rf autom4te*.cache
+# Use of 'cygnus' option must raise an unconditional error, not a
+# warning.
+AUTOMAKE="$am_original_AUTOMAKE -Wnone -Wno-error"
# 'cygnus' option in Makefile.am
echo "AUTOMAKE_OPTIONS = cygnus" > Makefile.am
-cat Makefile.am # For debugging.
-$AUTOMAKE -Wno-obsolete
AUTOMAKE_fails
grep "^Makefile\.am:1:.*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete
-grep "^Makefile\.am:1:.*$warn_rx" stderr
rm -rf autom4te*.cache
@@ -59,10 +40,7 @@ rm -rf autom4te*.cache
sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([cygnus])|" configure.ac > t
diff configure.ac t && fatal_ "failed to edit configure.ac"
mv -f t configure.ac
-$AUTOMAKE -Wno-obsolete
AUTOMAKE_fails
grep "^configure\.ac:2:.*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete
-grep "^configure\.ac:2:.*$warn_rx" stderr
:
diff --git a/t/depend5.sh b/t/depend5.sh
index 2bc6a8f5a..8b2371ec6 100755
--- a/t/depend5.sh
+++ b/t/depend5.sh
@@ -47,9 +47,8 @@ else
depdir=
fi
-# For the fun of it, we should also cope with makefile
-# names that contain weird characters, with Autoconf 2.62
-# and newer.
+# For the fun of it, we should also cope with Makefile names
+# that contain weird characters and newer.
# Pick the first name that the file system will accept.
for name in \
'weird name with $ `#() &! characters"' \
diff --git a/t/dirlist.sh b/t/dirlist.sh
index e18877711..319726c5d 100755
--- a/t/dirlist.sh
+++ b/t/dirlist.sh
@@ -19,7 +19,7 @@
. ./defs || exit 1
cat > configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
AM_INIT_GUILE_MODULE
EOF
@@ -29,7 +29,7 @@ echo ./dirlist-test > acdir/dirlist
cat >dirlist-test/dirlist-check.m4 <<'END'
AC_DEFUN([AM_INIT_GUILE_MODULE],[
. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AM_INIT_AUTOMAKE(foreign)
AC_CONFIG_AUX_DIR(..)
module=[$1]
AC_SUBST(module)])
diff --git a/t/dirlist2.sh b/t/dirlist2.sh
index 5a11769c2..26320f60e 100755
--- a/t/dirlist2.sh
+++ b/t/dirlist2.sh
@@ -19,7 +19,7 @@
. ./defs || exit 1
cat > configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
AM_INIT_GUILE_MODULE
AM_FOO_BAR
EOF
@@ -27,12 +27,7 @@ EOF
mkdir dirlist21-test dirlist22-test
cat >dirlist21-test/dirlist21-check.m4 <<'END'
-AC_DEFUN([AM_INIT_GUILE_MODULE],[
-. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-AC_CONFIG_AUX_DIR(..)
-module=[$1]
-AC_SUBST(module)])
+AC_DEFUN([AM_INIT_GUILE_MODULE],[. $srcdir/../GUILE-VERSION])
END
cat >dirlist22-test/dirlist22-check.m4 <<'END'
diff --git a/t/dist-auxdir-many-subdirs.sh b/t/dist-auxdir-many-subdirs.sh
index eb6b98c33..4937a14b0 100755
--- a/t/dist-auxdir-many-subdirs.sh
+++ b/t/dist-auxdir-many-subdirs.sh
@@ -41,7 +41,7 @@ do_check ()
unindent > configure.ac << END
AC_INIT([$me], [$count])
AC_CONFIG_AUX_DIR([$auxdir])
- AM_INIT_AUTOMAKE([parallel-tests])
+ AM_INIT_AUTOMAKE
AC_PROG_CC
# We don't want to require python or emcas in this test, so
# the tricks below.
@@ -56,8 +56,6 @@ END
foo_SOURCES = foo.c
## For py-compile.
python_PYTHON = bar.py
- ## For elisp-comp.
- lisp_LISP = baz.el
## For test-driver.
TESTS =
END
@@ -67,7 +65,6 @@ END
missing
depcomp
py-compile
- elisp-comp
test-driver
'
diff --git a/t/distcom4.sh b/t/distcom4.sh
index 8786ca2cb..691c19721 100755
--- a/t/distcom4.sh
+++ b/t/distcom4.sh
@@ -18,7 +18,6 @@
# This tries to distribute a file from a subdirectory, without
# Makefile in that directory. 'distcom5.sh' performs the same
# test with a Makefile in the directory.
-# Also make sure that README appears first in DIST_COMMON.
. ./defs || exit 1
@@ -71,7 +70,5 @@ cat dc.txt # For debugging.
test 1 -eq $(grep -c tests dc.txt)
grep configure dc.txt
-# README must come first.
-grep 'DIST_COMMON = README' Makefile.in
:
diff --git a/t/dollarvar.sh b/t/dollarvar.sh
index f28ce04dd..adaf178ec 100755
--- a/t/dollarvar.sh
+++ b/t/dollarvar.sh
@@ -35,6 +35,7 @@ blo = $(foo${x})
EOF
$ACLOCAL
+
AUTOMAKE_fails -Wportability
grep 'Makefile.am:2' stderr
grep 'Makefile.am:3' stderr
@@ -43,15 +44,7 @@ grep 'Makefile.am:5' stderr
grep 'Makefile.am:6' stderr
grep 'Makefile.am:7' stderr
-# On the other hand, if we allow 'silent-rules' mode, then we need to
-# allow recursive variable expansion, too.
-
-# This should work with the AM_SILENT_RULES macro.
-$sleep
-echo 'AM_SILENT_RULES' >> configure.ac
-
-$ACLOCAL --force
-AUTOMAKE_fails -Wportability
+AUTOMAKE_fails -Wportability -Wno-portability-recursive
grep 'Makefile.am:2' stderr
grep 'Makefile.am:3' stderr
grep 'Makefile.am:4' stderr
diff --git a/t/ext.sh b/t/ext.sh
index e1e890369..a69fe8b4a 100755
--- a/t/ext.sh
+++ b/t/ext.sh
@@ -22,12 +22,7 @@ cat >> configure.ac << 'END'
AC_PROG_F77
AC_PROG_FC
AC_PROG_OBJC
-# FIXME: this is to cater to older autoconf; remove this once we
-# FIXME: automake requires Autoconf 2.65 or later.
-m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [
- AC_SUBST([OBJCXX], [whocares])
- AM_CONDITIONAL([am__fastdepOBJCXX], [whocares])
-])
+AC_PROG_OBJCXX
AM_PROG_UPC
END
diff --git a/t/flavor.sh b/t/flavor.sh
index 8999795ce..91b334176 100755
--- a/t/flavor.sh
+++ b/t/flavor.sh
@@ -57,21 +57,4 @@ for flavor in --gnits --gnu --foreign --ignore-deps; do
done
-# Cygnus mode is deprecated now, and must be handled separately.
-$AUTOMAKE --cygnus -Wno-obsolete
-./configure --enable-maintainer-mode
-grep " --cygnus" Makefile
-$MAKE
-# Two code paths in configure.am:
-# - either a file in $(am__configure_deps) has been updated ...
-$sleep
-touch aclocal.m4
-$MAKE
-grep " --cygnus" Makefile
-# - ... or not; i.e., Makefile.am or an included file has.
-$sleep
-touch Makefile.am
-$MAKE
-grep " --cygnus" Makefile
-
:
diff --git a/t/gettext-macros.sh b/t/gettext-macros.sh
index a42c031d4..f6424ae6f 100755
--- a/t/gettext-macros.sh
+++ b/t/gettext-macros.sh
@@ -78,8 +78,6 @@ else
fi
fi
-. ./get.sh
-
cat >> get.sh <<'END'
# Even recent versions of gettext used the now-obsolete 'AM_PROG_MKDIR_P'
# m4 macro. So we need the following to avoid spurious errors.
@@ -87,6 +85,8 @@ ACLOCAL="$ACLOCAL -Wno-obsolete"
AUTOMAKE="$AUTOMAKE -Wno-obsolete"
END
+. ./get.sh
+
$ACLOCAL --force -I m4 || cat >> get.sh <<'END'
# We need to use '-Wno-syntax', since we do not want our test suite
# to fail merely because some third-party '.m4' file is underquoted.
diff --git a/t/help-multilib.sh b/t/help-multilib.sh
deleted file mode 100755
index d4f64024a..000000000
--- a/t/help-multilib.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Make sure that our macro 'AM_ENABLE_MULTILIB' adds proper text to
-# the configure help screen.
-# FIXME: the features tested by this script has been moved in contrib.
-# FIXME: We should move this script accordingly.
-
-. ./defs || exit 1
-
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-AM_ENABLE_MULTILIB
-END
-
-cat "$am_top_srcdir"/contrib/multilib/multi.m4 > aclocal.m4
-$AUTOCONF
-
-grep_configure_help --enable-multilib ' many library versions \(default\)'
-
-:
diff --git a/t/help-silent.sh b/t/help-silent.sh
index b7e805e76..601666c76 100755
--- a/t/help-silent.sh
+++ b/t/help-silent.sh
@@ -14,23 +14,20 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure that our macro 'AM_SILENT_RULES' adds proper text to
-# the configure help screen.
+# Make sure configure options relative to automake silent rules are
+# added to the configure help screen.
. ./defs || exit 1
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-AM_SILENT_RULES
-END
-
+: > Makefile.am
$ACLOCAL
-mv -f configure.ac configure.tmpl
+cp configure.ac configure.tmpl
-for args in '' '([])' '([yes])' '([no])'; do
- sed "s/AM_SILENT_RULES.*/&$args/" configure.tmpl >configure.ac
- cat configure.ac
+for args in '' 'yes' 'no'; do
+ cp -f configure.tmpl configure.ac
+ test x"$args" = x || echo "AM_SILENT_RULES([$args])/" >> configure.ac
+ cat configure.ac # For debugging.
$AUTOCONF --force
grep_configure_help --enable-silent-rules \
' less verbose build.*\(undo.*"make V=1".*\)'
diff --git a/t/instdir-texi.sh b/t/instdir-texi.sh
index ef6bc2016..33bf6361e 100755
--- a/t/instdir-texi.sh
+++ b/t/instdir-texi.sh
@@ -17,7 +17,7 @@
# If $(infodir) is the empty string, then nothing should be installed there.
# Likewise for the other install-* targets used for texinfo files.
-required='makeinfo-html tex texi2dvi'
+required='makeinfo tex texi2dvi'
. ./defs || exit 1
dvips --help \
diff --git a/t/java-compile-run-flat.sh b/t/java-compile-run-flat.sh
index c04f4d997..7d228bb1f 100755
--- a/t/java-compile-run-flat.sh
+++ b/t/java-compile-run-flat.sh
@@ -20,8 +20,8 @@
# This test uses a "flat" setup for the source tree (i.e., everything in
# the top-level directory), and forces the use of the old, non-parallel
# testsuite driver. The sister test 'java-compile-run-nested.sh' do
-# similar checks with a more usual, "nested" setup, and using the newer
-# 'parallel-tests' driver.
+# similar checks with a more usual, "nested" setup, and using the older
+# 'serial-tests' driver.
required='java javac'
am_serial_tests=yes
diff --git a/t/java-compile-run-nested.sh b/t/java-compile-run-nested.sh
index 1448952f5..9c0958cdd 100755
--- a/t/java-compile-run-nested.sh
+++ b/t/java-compile-run-nested.sh
@@ -18,11 +18,11 @@
# Also meddle with wrapper scripts, as would be probably seen in a real
# "UNIX-style" use case.
# This test uses a typical "nested" source tree setup (i.e., different
-# components/aspects are separated into different subdirectories),
-# and uses the 'parallel-tests' testsuite driver. The sister test
-# 'java-compile-run-flat.sh' do similar checks with a "flat" setup
-# (i.e., everything in the top-level directory), and forcing the use
-# of the older non-parallel 'simple-tests' driver.
+# components/aspects are separated into different subdirectories), and
+# uses the parallel testsuite driver.
+# The sister test 'java-compile-run-flat.sh' do similar checks with
+# a "flat" setup (i.e., everything in the top-level directory), and
+# forcing the use of the older 'serial-tests' driver.
required='java javac'
. ./defs || exit 1
diff --git a/t/version2.sh b/t/lisp-flags.sh
index b690dc9a2..1d7d8f3c7 100755
--- a/t/version2.sh
+++ b/t/lisp-flags.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 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
@@ -14,28 +14,28 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test to make sure 3rd arg to AM_INIT_AUTOMAKE not picked up in
-# version. From Joel Weber.
+# Elisp byte-compilation honours AM_ELCFLAFS and ELCFLAGS.
. ./defs || exit 1
-cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE([sh-utils], [1.12o], [no])
-AC_CONFIG_FILES([Makefile])
+cat > Makefile.am << 'EOF'
+lisp_LISP = foo.el
+AM_ELCFLAGS = __am_elcflags__
+EOF
+
+cat >> configure.ac << 'EOF'
+AM_PATH_LISPDIR
AC_OUTPUT
-END
+EOF
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
-: > Makefile.am
+./configure EMACS='echo >$@' --with-lispdir="$(pwd)/unused"
-# Files required by Gnits.
-: > INSTALL
-: > NEWS
-: > README
-: > COPYING
-: > AUTHORS
-: > ChangeLog
-: > THANKS
+: > foo.el
+ELCFLAGS='__usr_elcflags__' $MAKE -e
+grep '__am_elcflags__.*__usr_elcflags__' foo.elc
-$ACLOCAL
-$AUTOMAKE --gnits -Wno-obsolete
+:
diff --git a/t/lisp-loadpath.sh b/t/lisp-loadpath.sh
new file mode 100755
index 000000000..e0f21ce98
--- /dev/null
+++ b/t/lisp-loadpath.sh
@@ -0,0 +1,67 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Emacs lisp files in both $(srcdir) and $(builddir) are found if
+# required by other files. Related to automake bug#11806.
+
+required=emacs
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LISP = requirer.el
+lisp_LISP = foo.el
+lisp_DATA = bar.el
+END
+
+echo "(require 'foo) (require 'bar)" >> requirer.el
+echo "(provide 'foo)" > foo.el
+echo "(provide 'bar)" > bar.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+mkdir build
+cd build
+../configure
+$MAKE
+test -f requirer.elc
+test -f foo.elc
+test ! -e bar.elc
+
+$MAKE clean
+test ! -e requirer.elc
+test ! -e foo.elc
+
+# In the spirit of VPATH, stuff in the builddir is preferred to
+# stuff in the srcdir.
+echo "(provide" > ../foo.el # Break it.
+echo "defun)" > ../bar.el # Likewise.
+$MAKE && exit 1
+$sleep
+echo "(provide 'foo)" > foo.el
+echo "(provide 'bar)" > bar.el
+$MAKE
+test -f requirer.elc
+test -f foo.elc
+test ! -e bar.elc
+
+:
diff --git a/t/lisp-subdir-mix.sh b/t/lisp-subdir-mix.sh
new file mode 100755
index 000000000..20073ecdb
--- /dev/null
+++ b/t/lisp-subdir-mix.sh
@@ -0,0 +1,96 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check compiling elisp files in different subdirectories, where a
+# file in a subdirectory might require a file in another one.
+# This doesn't work out of the box, but can be made to work with a
+# judicious use of $(AM_ELCFLAGS).
+
+required=emacs
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+dist_lisp_LISP = \
+ am-here.el \
+ sub1/am-one.el \
+ sub2/am-two.el \
+ sub3/subsub/am-three.el
+
+AM_ELCFLAGS = \
+ -L $(srcdir)/sub1 \
+ -L $(srcdir)/sub2 \
+ -L $(srcdir)/sub3/subsub
+
+elc-test:
+ test -f sub1/am-one.elc
+ test -f sub2/am-two.elc
+ test -f sub3/subsub/am-three.elc
+.PHONY: elc-test
+check-local: elc-test
+END
+
+mkdir sub1 sub2 sub3 sub3/subsub
+
+cat > am-here.el << 'END'
+(provide 'am-here)
+(require 'am-one)
+(require 'am-two)
+(require 'am-three)
+END
+
+cat > sub1/am-one.el << 'END'
+(require 'am-here)
+(provide 'am-one)
+(require 'am-two)
+(require 'am-three)
+END
+
+cat > sub2/am-two.el << 'END'
+(require 'am-here)
+(require 'am-one)
+(provide 'am-two)
+(require 'am-three)
+END
+
+cat > sub3/subsub/am-three.el << 'END'
+(require 'am-here)
+(require 'am-one)
+(require 'am-two)
+(provide 'am-three)
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+
+$MAKE
+$MAKE elc-test
+$MAKE clean
+for x in am-here sub1/am-one sub2/am-two sub3/subsub/am-three; do
+ test -f $x.el
+ test ! -e $x.elc
+done
+
+$MAKE distcheck
+
+:
diff --git a/t/lisp-subdir.sh b/t/lisp-subdir.sh
new file mode 100755
index 000000000..5c67c534f
--- /dev/null
+++ b/t/lisp-subdir.sh
@@ -0,0 +1,80 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Emacs lisp files in subdirectories.
+
+required=emacs
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+nobase_lisp_LISP = sub/am-one.el sub/am-two.el sub/am-three.el
+nobase_dist_lisp_LISP = sub/am-three.el
+dist_noinst_LISP = sub/am-four.el
+EXTRA_DIST = sub/am-one.el sub/am-two.el
+END
+
+mkdir sub
+echo "(require 'am-two) (provide 'am-one)" > sub/am-one.el
+echo "(require 'am-three) (provide 'am-two)" > sub/am-two.el
+echo "(provide 'am-three)" > sub/am-three.el
+echo "(require 'am-one) (require 'am-two)" > sub/am-four.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure --prefix="$(pwd)/inst" \
+ --with-lispdir="$(pwd)/inst/elisp" \
+
+$MAKE
+# No byte-compiled elisp files in the top-level directory.
+test "$(echo *.elc)" = '*.elc'
+test -f sub/am-one.elc
+test -f sub/am-two.elc
+test -f sub/am-three.elc
+test -f sub/am-four.elc
+$MAKE clean
+test ! -e sub/am-one.elc
+test ! -e sub/am-two.elc
+test ! -e sub/am-three.elc
+test ! -e sub/am-four.elc
+
+# Check installation.
+
+sort > exp << 'END'
+inst/elisp/sub/am-one.elc
+inst/elisp/sub/am-two.elc
+inst/elisp/sub/am-three.elc
+END
+
+$MAKE install
+find inst # For debugging.
+find inst -name '*.elc' > lst || { cat lst; exit 1; }
+sort lst > got
+
+cat exp
+cat got
+diff exp got
+
+# Also check VPATH builds and uninstall completeness.
+$MAKE distcheck
+
+:
diff --git a/t/lisp-subdir2.sh b/t/lisp-subdir2.sh
new file mode 100755
index 000000000..d7517adb1
--- /dev/null
+++ b/t/lisp-subdir2.sh
@@ -0,0 +1,78 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Compiling elisp files in different subdirectories.
+
+required=emacs
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+dist_lisp_LISP = am-one.el
+nodist_lisp_LISP = sub/am-two.el
+sub/am-two.el:
+ mkdir sub
+ echo "(provide 'am-two)" > $@
+DISTCLEANFILES = $(nodist_lisp_LISP)
+dist_noinst_LISP = x/y/z/am-three.el
+
+elc-test:
+ test -f am-one.elc
+ test -f sub/am-two.elc
+ test -f x/y/z/am-three.elc
+.PHONY: elc-test
+check-local: elc-test
+END
+
+mkdir x x/y x/y/z
+echo "(provide 'am-one)" > am-one.el
+# sub/am-two.el is generated at make runtime
+echo "(provide 'am-three)" > x/y/z/am-three.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+
+$MAKE
+$MAKE elc-test
+$MAKE clean
+test ! -e am-one.elc
+test ! -e sub/am-two.elc
+test ! -e x/y/z/am-three.elc
+test -f am-one.el
+test -f sub/am-two.el
+test -f x/y/z/am-three.el
+
+# Byte-compiling only a subset of the elisp files.
+$MAKE am-one.elc sub/am-two.elc
+test -f am-one.elc
+test -f sub/am-two.elc
+test ! -e x/y/z/am-three.elc
+rm -f am-one.elc sub/am-two.elc
+$MAKE x/y/z/am-three.elc
+test ! -e am-one.elc
+test ! -e sub/am-two.elc
+test -f x/y/z/am-three.elc
+
+$MAKE distcheck
+
+:
diff --git a/t/lisp3.sh b/t/lisp3.sh
index 5b95715ec..a75215112 100755
--- a/t/lisp3.sh
+++ b/t/lisp3.sh
@@ -47,7 +47,6 @@ $MAKE
test -f am-one.elc
test -f am-two.elc
test -f am-three.elc
-test -f elc-stamp
# Make sure we can recover from a deletion.
rm -f am-one.elc
@@ -79,15 +78,6 @@ test -f _inst/$dir/site-lisp/am-three.elc
$MAKE uninstall
find _inst | $EGREP '\.elc?$' && exit 1
-# Make sure we build all files when any of them change.
-# (We grep a message to make sure the compilation happens.)
-unique=0a3346e2af8a689b85002b53df09142a
-$sleep
-echo "(message \"$unique\")(provide 'am-three)" > am-three.el
-$MAKE >output 2>&1 || { cat output; exit 1; }
-cat output
-grep $unique output
-
# It should also work for VPATH-builds.
$MAKE distcheck
diff --git a/t/lisp4.sh b/t/lisp4.sh
index b8cb7963a..41dc87379 100755
--- a/t/lisp4.sh
+++ b/t/lisp4.sh
@@ -32,7 +32,6 @@ test:
test ! -f am-one.elc
test ! -f am-two.elc
test ! -f am-three.elc
- test ! -f elc-stamp
install-test: install
test -f "$(lispdir)/am-one.el"
diff --git a/t/lisp5.sh b/t/lisp5.sh
index 4624010ae..28d7a6284 100755
--- a/t/lisp5.sh
+++ b/t/lisp5.sh
@@ -31,7 +31,6 @@ test:
test ! -f am-one.elc
test ! -f am-two.elc
test ! -f am-three.elc
- test ! -f elc-stamp
install-test: install
test -f "$(lispdir)/am-one.el"
diff --git a/t/lisp6.sh b/t/lisp6.sh
index e877d5a2a..c84917ca7 100755
--- a/t/lisp6.sh
+++ b/t/lisp6.sh
@@ -57,7 +57,6 @@ $MAKE
test -f am-one.elc
test ! -e am-two.elc
test -f am-three.elc
-test -f elc-stamp
$MAKE install
test -f lisp/am-one.el
@@ -73,7 +72,6 @@ $MAKE distclean
test ! -e am-one.elc
test ! -e am-two.elc
test ! -e am-three.elc
-test ! -e elc-stamp
./configure --with-lispdir="$cwd/lisp" want_two=1
@@ -81,7 +79,6 @@ $MAKE
test -f am-one.elc
test -f am-two.elc
test -f am-three.elc
-test -f elc-stamp
# Let's mutilate the source tree, to check the recover rule.
rm -f am-*.elc
@@ -89,7 +86,6 @@ $MAKE
test -f am-one.elc
test -f am-two.elc
test -f am-three.elc
-test -f elc-stamp
$MAKE install
test -f lisp/am-one.el
@@ -105,6 +101,5 @@ $MAKE distclean
test ! -e am-one.elc
test ! -e am-two.elc
test ! -e am-three.elc
-test ! -e elc-stamp
:
diff --git a/t/lisp7.sh b/t/lisp7.sh
index 4553298cd..7efa27fad 100755
--- a/t/lisp7.sh
+++ b/t/lisp7.sh
@@ -39,12 +39,10 @@ $AUTOMAKE --add-missing
$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-test 1 -eq $(grep -c 'Warnings can be ignored' stdout)
test ! -e am-one.elc
test ! -e am-two.elc
test ! -e am-three.elc
-test -f elc-stamp
$MAKE distcheck
diff --git a/t/lisp8.sh b/t/lisp8.sh
index 6e6b901de..7464c6891 100755
--- a/t/lisp8.sh
+++ b/t/lisp8.sh
@@ -42,12 +42,10 @@ $AUTOMAKE --add-missing
$MAKE -j >>stdout || { cat stdout; exit 1; }
cat stdout
-test 1 -eq $(grep -c 'Warnings can be ignored' stdout)
test -f am-one.elc
test -f am-two.elc
test -f am-three.elc
-test -f elc-stamp
rm -f am-*.elc
@@ -56,10 +54,8 @@ rm -f am-*.elc
$MAKE -j >>stdout || { cat stdout; exit 1; }
cat stdout
-test 1 -eq $(grep -c 'Warnings can be ignored' stdout)
test -f am-one.elc
test -f am-two.elc
test -f am-three.elc
-test -f elc-stamp
:
diff --git a/t/lispdry.sh b/t/lispdry.sh
index f7de07126..765942d96 100755
--- a/t/lispdry.sh
+++ b/t/lispdry.sh
@@ -42,9 +42,8 @@ $MAKE
test -f am-one.elc
test -f am-two.elc
test -f am-three.elc
-test -f elc-stamp
-rm -f am-*.elc elc-stamp
+rm -f am-*.elc
chmod a-w .
@@ -53,6 +52,5 @@ $MAKE -n
test ! -e am-one.elc
test ! -e am-two.elc
test ! -e am-three.elc
-test ! -e elc-stamp
:
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index e38e7ffb9..6d01646fa 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -41,7 +41,6 @@ t/remake-timing-bug-pr8365.sh \
t/lex-subobj-nodep.sh \
t/remake-am-pr10111.sh \
t/remake-m4-pr10111.sh \
-t/tags-pr12372.sh \
t/txinfo5.sh \
$(perl_fake_XFAIL_TESTS)
@@ -85,6 +84,7 @@ t/acloca11.sh \
t/acloca12.sh \
t/acloca13.sh \
t/acloca14.sh \
+t/acloca14b.sh \
t/acloca15.sh \
t/acloca16.sh \
t/acloca17.sh \
@@ -93,9 +93,12 @@ t/acloca19.sh \
t/acloca20.sh \
t/acloca21.sh \
t/acloca22.sh \
+t/acloca22b.sh \
t/acloca23.sh \
t/aclocal-acdir.sh \
t/aclocal-install-absdir.sh \
+t/aclocal-macrodir.tap \
+t/aclocal-amflags.sh \
t/aclocal-print-acdir.sh \
t/aclocal-path.sh \
t/aclocal-path-install.sh \
@@ -106,6 +109,7 @@ t/aclocal-install-fail.sh \
t/aclocal-install-mkdir.sh \
t/aclocal-no-install-no-mkdir.sh \
t/aclocal-verbose-install.sh \
+t/aclocal-autoconf-version-check.sh \
t/ac-output-old.tap \
t/acsilent.sh \
t/acsubst.sh \
@@ -156,7 +160,6 @@ t/autodist-configure-no-subdir.sh \
t/autodist-no-duplicate.sh \
t/autodist-stamp-vti.sh \
t/autohdr.sh \
-t/autohdr2.sh \
t/autohdr3.sh \
t/autohdr4.sh \
t/autohdr-subdir-pr12495.sh \
@@ -174,9 +177,8 @@ t/auxdir-unportable.tap \
t/backcompat.sh \
t/backcompat2.sh \
t/backcompat3.sh \
-t/backcompat4.sh \
-t/backcompat5.sh \
t/backcompat6.sh \
+t/backcompat-acout.sh \
t/backsl.sh \
t/backsl2.sh \
t/backsl3.sh \
@@ -223,7 +225,6 @@ t/check-no-test-driver.sh \
t/check-concurrency-bug9245.sh \
t/checkall.sh \
t/clean.sh \
-t/clean2.sh \
t/colneq.sh \
t/colneq2.sh \
t/colneq3.sh \
@@ -234,8 +235,9 @@ t/colon4.sh \
t/colon5.sh \
t/colon6.sh \
t/colon7.sh \
-t/color.sh \
-t/color2.sh \
+t/color-tests.sh \
+t/color-tests2.sh \
+t/color-tests-opt.sh \
t/comment.sh \
t/comment2.sh \
t/comment3.sh \
@@ -341,13 +343,7 @@ t/cxx-lt-demo.sh \
t/cxxlibobj.sh \
t/cxxlink.sh \
t/cxxnoc.sh \
-t/cygnus-deprecation.sh \
-t/cygnus-check-without-all.sh \
-t/cygnus-dependency-tracking.sh \
-t/cygnus-imply-foreign.sh \
-t/cygnus-no-dist.sh \
-t/cygnus-no-installinfo.sh \
-t/cygnus-requires-maintainer-mode.sh \
+t/cygnus-no-more.sh \
t/cygwin32.sh \
t/dash.sh \
t/defun.sh \
@@ -498,7 +494,6 @@ t/help-depend2.sh \
t/help-dmalloc.sh \
t/help-init.sh \
t/help-lispdir.sh \
-t/help-multilib.sh \
t/help-python.sh \
t/help-silent.sh \
t/help-upc.sh \
@@ -638,8 +633,13 @@ t/lisp5.sh \
t/lisp6.sh \
t/lisp7.sh \
t/lisp8.sh \
+t/lisp-loadpath.sh \
+t/lisp-subdir.sh \
+t/lisp-subdir2.sh \
+t/lisp-subdir-mix.sh \
t/lispdry.sh \
t/lisp-pr11806.sh \
+t/lisp-flags.sh \
t/listval.sh \
t/location.sh \
t/longline.sh \
@@ -669,7 +669,6 @@ t/makevars.sh \
t/man.sh \
t/man2.sh \
t/man3.sh \
-t/man4.sh \
t/man5.sh \
t/man6.sh \
t/man7.sh \
@@ -680,12 +679,8 @@ t/mdate3.sh \
t/mdate4.sh \
t/mdate5.sh \
t/mdate6.sh \
-t/missing.sh \
-t/missing2.sh \
+t/missing-version-mismatch.sh \
t/missing3.sh \
-t/missing4.sh \
-t/missing5.sh \
-t/missing6.sh \
t/am-missing-prog.sh \
t/missing-auxfile-stops-makefiles-creation.sh \
t/mkdir_p.sh \
@@ -695,7 +690,6 @@ t/mkinst2.sh \
t/mkinst3.sh \
t/mmode.sh \
t/mmodely.sh \
-t/multlib.sh \
t/no-extra-makefile-code.sh \
t/no-spurious-install-recursive.sh \
t/nobase.sh \
@@ -726,7 +720,6 @@ t/objcxx-flags.sh \
t/objcxx-deps.sh \
t/objc-megademo.sh \
t/objext-pr10128.sh \
-t/obsolete.sh \
t/oldvars.sh \
t/order.sh \
t/output.sh \
@@ -751,7 +744,6 @@ t/parallel-am.sh \
t/parallel-am2.sh \
t/parallel-am3.sh \
t/serial-tests.sh \
-t/parallel-tests2.sh \
t/parallel-tests-basics.sh \
t/parallel-tests-concurrency.sh \
t/parallel-tests-concurrency-2.sh \
@@ -902,8 +894,17 @@ t/python-dist.sh \
t/python-vars.sh \
t/python-virtualenv.sh \
t/python-pr10995.sh \
-t/recurs.sh \
-t/recurs2.sh \
+t/recurs-user.sh \
+t/recurs-user2.sh \
+t/recurs-user-deeply-nested.sh \
+t/recurs-user-indir.sh \
+t/recurs-user-keep-going.sh \
+t/recurs-user-many.sh \
+t/recurs-user-no-subdirs.sh \
+t/recurs-user-no-top-level.sh \
+t/recurs-user-override.sh \
+t/recurs-user-phony.sh \
+t/recurs-user-wrap.sh \
t/relativize.tap \
t/remake-fail.sh \
t/remake-not-after-make-dist.sh \
@@ -921,6 +922,7 @@ t/remake-deeply-nested.sh \
t/remake-mild-stress.sh \
t/remake-all-1.sh \
t/remake-all-2.sh \
+t/remake-recurs-user.sh \
t/remake-subdir.sh \
t/remake-subdir2.sh \
t/remake-subdir3.sh \
@@ -944,6 +946,8 @@ t/remake-deleted-am-2.sh \
t/remake-deleted-am-subdir.sh \
t/remake-deleted-am.sh \
t/remake-renamed-am.sh \
+t/remake-aclocal-version-mismatch.sh \
+t/remake-macrodir.sh \
t/remake-timing-bug-pr8365.sh \
t/req.sh \
t/reqd.sh \
@@ -970,15 +974,12 @@ t/silent6.sh \
t/silent7.sh \
t/silent8.sh \
t/silent9.sh \
-t/silent-obsolescent-warns.sh \
t/silentcxx.sh \
t/silentcxx-gcc.sh \
t/silentf77.sh \
t/silentf90.sh \
-t/silent-amopts.sh \
t/silent-many-gcc.sh \
t/silent-many-generic.sh \
-t/silent-nowarn.sh \
t/silent-configsite.sh \
t/silent-nested-vars.sh \
t/silent-lex.sh \
@@ -1164,8 +1165,6 @@ t/txinfo.sh \
t/txinfo2.sh \
t/txinfo3.sh \
t/txinfo4.sh \
-t/txinfo5.sh \
-t/txinfo5b.sh \
t/txinfo6.sh \
t/txinfo7.sh \
t/txinfo8.sh \
@@ -1185,7 +1184,6 @@ t/txinfo26.sh \
t/txinfo27.sh \
t/txinfo28.sh \
t/txinfo29.sh \
-t/txinfo30.sh \
t/txinfo31.sh \
t/txinfo32.sh \
t/txinfo33.sh \
@@ -1214,11 +1212,11 @@ t/vala-mix2.sh \
t/vala-parallel.sh \
t/vars.sh \
t/vars3.sh \
+t/var-recurs.sh \
+t/var-recurs2.sh \
t/vartar.sh \
t/vartypos.sh \
t/vartypo2.sh \
-t/version.sh \
-t/version2.sh \
t/version3.sh \
t/version4.sh \
t/version6.sh \
diff --git a/t/maken3.sh b/t/maken3.sh
index 6d580eca8..5f5d87a1b 100755
--- a/t/maken3.sh
+++ b/t/maken3.sh
@@ -22,7 +22,7 @@
# special target, the output from make is sufficiently complete.
#
# This test exercises the GCS-mandated targets (except for dist)
-# as well as tags, TAGS.
+# as well as tags.
# For gen-testsuite-part: ==> try-with-serial-tests <==
. ./defs || exit 1
@@ -111,8 +111,6 @@ installcheck-local:
@: > stamp-installcheck-sub
tags:
@: > stamp-tags-sub
-TAGS:
- @: > stamp-TAGS-sub
mostlyclean-local:
@: > stamp-mostlyclean-sub
maintainer-clean-local:
@@ -127,7 +125,7 @@ html:
@: > sub2-$@-should-not-be-executed
install-info install-html install-dvi install-pdf install-ps:
@: > sub2-$@-should-not-be-executed
-installcheck installdirs tags TAGS mostlyclean:
+installcheck installdirs tags mostlyclean:
@: > sub2-$@-should-not-be-executed
## These targets cannot be overridden like this:
## install-strip distclean maintainer-clean
@@ -142,12 +140,12 @@ check_targets ()
all install install-strip uninstall clean distclean check \
info html dvi pdf ps \
install-info install-html install-dvi install-pdf install-ps \
- installcheck installdirs tags TAGS mostlyclean maintainer-clean
+ installcheck installdirs tags mostlyclean maintainer-clean
do
$MAKE -n $target >stdout || { cat stdout; exit 1; }
cat stdout
case $target in
- install-* | installdirs | tags | TAGS ) ;;
+ install-* | installdirs | tags ) ;;
*)
if $have_dotmake; then
grep "stamp-$target$" stdout || exit 1
diff --git a/t/man4.sh b/t/man4.sh
deleted file mode 100755
index 2688b7d47..000000000
--- a/t/man4.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2008-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Ensure 'make dist' fails when help2man replacement man pages are created.
-#
-# The assumption here is the following: if the developer uses help2man to
-# generate man pages from --help output, then these man pages may not be
-# stored in VCS. However, they should be distributed, so that the end user
-# that receives the tarball doesn't have to install help2man. If they are
-# not distributed, then the developer should make help2man a prerequisite
-# to building the package from a tarball, e.g., with a configure check for
-# help2man that errors out if it is unavailable. In both cases it is
-# sufficient to check only distributed man pages.
-#
-# Idea of this whole shenanigan is to allow somebody to check out sources from
-# a VCS and build and install them without needing help2man installed. The
-# installed man pages will be bogus in this case. Typically, this happens
-# when developers ask users to try out a fix from VCS; the developers themselves
-# will usually have help2man installed (or should install it).
-
-. ./defs || exit 1
-
-cat > Makefile.am << 'END'
-dist_man_MANS = $(srcdir)/foo.1 bar.1
-dist_bin_SCRIPTS = foo bar
-$(srcdir)/foo.1:
- $(HELP2MAN) --output=$@ $(srcdir)/foo
-bar.1:
- $(HELP2MAN) --output=$(srcdir)/bar.1 $(srcdir)/bar
-END
-
-cat >>configure.ac <<'END'
-AM_MISSING_PROG([HELP2MAN], [help2man])
-AC_OUTPUT
-END
-
-cat > foo <<'END'
-#! /bin/sh
-while test $# -gt 0; do
- case $1 in
- -h | --help) echo "usage: $0 [OPTIONS]..."; exit 0;;
- -v | --version) echo "$0 1.0"; exit 0;;
- esac
- shift
-done
-END
-cp foo bar
-chmod +x foo bar
-
-mkdir bin
-cat > bin/help2man <<'END'
-#! /bin/sh
-# Fake help2man script that lets 'missing' think it is not installed.
-exit 127
-END
-chmod +x bin/help2man
-PATH=$(pwd)/bin$PATH_SEPARATOR$PATH
-
-grep_error_messages()
-{
- grep ' man pages contain.*missing help2man.* replacement text' stderr \
- && grep 'install help2man' stderr \
- && grep 'regenerate the man pages' stderr \
- || exit 1
-}
-
-$ACLOCAL
-$AUTOMAKE
-$AUTOCONF
-
-./configure
-$MAKE
-$MAKE dist 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep_error_messages
-$MAKE distcheck 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep_error_messages
-$MAKE distclean
-
-mkdir build
-cd build
-../configure
-$MAKE
-$MAKE dist 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep_error_messages
-$MAKE distcheck 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep_error_messages
-
-:
diff --git a/t/man6.sh b/t/man6.sh
index d6b51ef9e..dc90321ff 100755
--- a/t/man6.sh
+++ b/t/man6.sh
@@ -65,7 +65,7 @@ cd build
../configure
# Sanity check.
-grep '^HELP2MAN *=.*/missing --run help2man' Makefile
+grep '^HELP2MAN *=.*/missing help2man' Makefile
$MAKE
$FGREP foobar ../foobar.1
@@ -84,7 +84,7 @@ rm -f *.1 # Remove leftover generated manpages.
./configure
# Sanity check.
-grep '^HELP2MAN *=.*/missing --run help2man' Makefile
+grep '^HELP2MAN *=.*/missing help2man' Makefile
$MAKE
$FGREP foobar foobar.1
diff --git a/t/missing2.sh b/t/missing-version-mismatch.sh
index a17c5fd3e..e4a1033f3 100755
--- a/t/missing2.sh
+++ b/t/missing-version-mismatch.sh
@@ -16,43 +16,35 @@
# Test missing with version mismatches.
+am_create_testdir=empty
. ./defs || exit 1
-cat >>configure.ac <<'EOF'
-m4_include([v.m4])
-AC_OUTPUT
-EOF
+get_shell_script missing
-: > v.m4
+do_check ()
+{
+ progname=$1; shift;
+ ./missing "$@" 2>stderr && { cat stderr >&2; exit 1; }
+ cat stderr >&2
+ $FGREP "WARNING: '$progname' is probably too old." stderr
+}
-: > Makefile.am
+echo 'AC_INIT([x], [1.0]) AC_PREREQ([9999])' >> configure.ac
-get_shell_script missing
+do_check autoconf $AUTOCONF
+do_check autoheader $AUTOHEADER
+do_check aclocal-$APIVERSION $am_original_ACLOCAL
+
+cat > configure.ac << 'END'
+AC_INIT([x], [0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+END
+echo AUTOMAKE_OPTIONS = 9999.9999 > Makefile.am
$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-# See the test 'missing.sh' for explanations about this.
-MYAUTOCONF="./missing --run $AUTOCONF"
-unset AUTOCONF
-
-./configure AUTOCONF="$MYAUTOCONF"
-
-$MAKE
-$sleep
-# Hopefully the install version of Autoconf cannot compete with this one...
-echo 'AC_PREREQ(9999)' > v.m4
-$MAKE distdir
-
-# Run again, but without missing, to ensure that timestamps were updated.
-export AUTOMAKE ACLOCAL
-./configure AUTOCONF="$MYAUTOCONF"
-$MAKE
-
-# Make sure $MAKE fail when timestamps aren't updated and missing is not used.
-$sleep
-touch v.m4
-$MAKE && exit 1
+: > install-sh
+# FIXME: this doesn't work due to a bug in automake (not 'missing').
+#do_check automake-$APIVERSION $am_original_AUTOMAKE
:
diff --git a/t/missing.sh b/t/missing.sh
deleted file mode 100755
index fcca48f85..000000000
--- a/t/missing.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2003-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test missing with version mismatches.
-
-. ./defs || exit 1
-
-cat >>configure.ac <<'EOF'
-AC_OUTPUT
-EOF
-
-: > Makefile.am
-
-get_shell_script missing
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-# Make sure we do use missing, even if the user exported AUTOCONF.
-# (We cannot export this new value, because it would be used by Automake
-# when tracing, and missing is no good for this.)
-MYAUTOCONF="./missing --run $AUTOCONF"
-unset AUTOCONF
-
-./configure AUTOCONF="$MYAUTOCONF"
-$MAKE
-$sleep
-# Hopefully the install version of Autoconf cannot compete with this one...
-echo 'AC_PREREQ(9999)' >> aclocal.m4
-$MAKE distdir
-
-# Try version number suffixes if we can add them safely.
-case $MYAUTOCONF in *autoconf)
- ./configure AUTOCONF="${MYAUTOCONF}6789"
- $MAKE
- $sleep
- # Hopefully the install version of Autoconf cannot compete with this one...
- echo 'AC_PREREQ(9999)' >> aclocal.m4
- $MAKE distdir
-esac
-
-# Run again, but without missing, to ensure that timestamps were updated.
-export AUTOMAKE ACLOCAL
-./configure AUTOCONF="$MYAUTOCONF"
-$MAKE
-
-# Make sure $MAKE fails when timestamps aren't updated and missing is not used.
-$sleep
-touch aclocal.m4
-$MAKE && exit 1
-
-:
diff --git a/t/missing3.sh b/t/missing3.sh
index c5db4f038..b2cacf979 100755
--- a/t/missing3.sh
+++ b/t/missing3.sh
@@ -23,31 +23,33 @@ get_shell_script missing
# b7cb8259 assumed not to exist.
-./missing b7cb8259 --version 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep . stderr && exit 1
-./missing b7cb8259 --grep 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep WARNING stderr
-
-./missing --run b7cb8259 --version && exit 1
-./missing --run b7cb8259 --grep 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep WARNING stderr
+run_cmd ()
+{
+ st=0; "$@" >stdout 2>stderr || st=$?
+ cat stdout
+ cat stderr >&2
+ return $st
+}
+
+run_cmd ./missing b7cb8259 --version && exit 1
+grep WARNING stderr && exit 1
+run_cmd ./missing b7cb8259 --grep && exit 1
+
+if test x"$am_test_prefer_config_shell" != x"yes"; then
+ # The /bin/sh from Solaris 10 is a spectacular failure. After a failure
+ # due to a "command not found", it sets '$?' to '1'.
+ if (st=0; /bin/sh -c 'no--such--command' || st=$?; test $st -eq 127); then
+ grep 'WARNING:.*missing on your system' stderr
+ fi
+fi
# missing itself it known to exist :)
-./missing ./missing --version 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep . stderr && exit 1
-./missing ./missing --grep 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep WARNING stderr
-
-./missing --run ./missing --version 2>stderr || { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep . stderr && exit 1
-./missing --run ./missing --grep 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
+run_cmd ./missing ./missing --version || exit 1
+grep 'missing .*(GNU [aA]utomake)' stdout
+test -s stderr && exit 1
+run_cmd ./missing ./missing --grep && exit 1
grep WARNING stderr && exit 1
-grep Unknown stderr
+grep "missing:.* unknown '--grep'" stderr
+
+:
diff --git a/t/missing5.sh b/t/missing5.sh
deleted file mode 100755
index 6e575b636..000000000
--- a/t/missing5.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2006-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test how well 'missing' finds output file names of various tools.
-# PR automake/483.
-
-am_create_testdir=empty
-. ./defs || exit 1
-
-get_shell_script missing
-
-# These programs may be invoked by 'missing'.
-needed_tools='chmod find sed test touch'
-needed_tools_csep=$(echo $needed_tools | sed 's/ /, /g')
-
-cat >configure.ac <<EOF
-AC_INIT([missing4], [1.0])
-m4_foreach([tool], [$needed_tools_csep],
- [AC_PATH_PROG(tool, tool, [false])
- AC_CONFIG_FILES(tool, chmod +x tool)
- ])
-AC_OUTPUT
-EOF
-
-for tool in $needed_tools; do
- unindent >$tool.in <<EOF
- #! /bin/sh
- exec @$tool@ "\$@"
-EOF
-done
-
-$AUTOCONF
-./configure
-
-echo output-file > output-file
-cp output-file my--output--file-o
-
-save_PATH=$PATH
-PATH=.
-export PATH
-missing --help
-missing --version
-for tool in autom4te help2man makeinfo; do
- missing --run $tool -o my--output--file-o input
- missing --run $tool --output my--output--file-o input
-done
-PATH=$save_PATH
-export PATH
-diff output-file my--output--file-o
-test ! -e ./--file-o
-test ! -e input
diff --git a/t/mkdirp-deprecation.sh b/t/mkdirp-deprecation.sh
index 68ffa5819..8482dea36 100755
--- a/t/mkdirp-deprecation.sh
+++ b/t/mkdirp-deprecation.sh
@@ -14,37 +14,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that the AM_PROG_MKDIR_P macro is deprecated; it will be
-# be removed in the next major Automake release. But also check
-# that it still works as expected in the current release series.
+# Check that the AM_PROG_MKDIR_P macro is deprecated. It will be
+# be removed in the next major Automake release.
. ./defs || exit 1
-cat >> configure.ac << 'END'
-AM_PROG_MKDIR_P
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-SUBDIRS = sub
-all-local:
- $(mkdir_p) . dir1/a
- @mkdir_p@ . dir2/b
-check-local: all
- test -d dir1/a
- test -d dir2/b
- test -d dir3/c
- test -d dir3/d
-END
-
-mkdir sub
-cat > sub/Makefile.am << 'END'
-# '$(mkdir_p)' should continue to work even in subdir makefiles.
-all-local:
- $(mkdir_p) .. ../dir3/c
- @mkdir_p@ .. ../dir3/d
-END
+echo AM_PROG_MKDIR_P >> configure.ac
+: > Makefile.am
grep_err ()
{
@@ -62,15 +38,11 @@ grep_err
$AUTOCONF -Werror -Wno-obsolete
-AUTOMAKE_fails
-grep_err
+#AUTOMAKE_fails
+#grep_err
AUTOMAKE_fails --verbose -Wnone -Wobsolete
grep_err
$AUTOMAKE -Wno-obsolete
-./configure
-$MAKE check-local
-$MAKE distcheck
-
:
diff --git a/t/multlib.sh b/t/multlib.sh
deleted file mode 100755
index 778db14e4..000000000
--- a/t/multlib.sh
+++ /dev/null
@@ -1,162 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2003-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check multilib support.
-# Based on a test case from Ralf Corsepius.
-# FIXME: the features tested by this script has been moved in contrib.
-# FIXME: We should move this script accordingly.
-
-required='gcc GNUmake'
-. ./defs || exit 1
-
-mldir=$am_top_srcdir/contrib/multilib
-mkdir m4
-cp "$mldir"/config-ml.in "$mldir"/symlink-tree .
-cp "$mldir"/multi.m4 m4
-
-ACLOCAL_PATH=${ACLOCAL_PATH+"$ACLOCAL_PATH:"}$(pwd)/m4
-export ACLOCAL_PATH
-
-cat >configure.ac <<'END'
-AC_INIT([multlib], [1.0])
-AC_CONFIG_SRCDIR(libfoo/foo.c)
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([Makefile])
-AC_CONFIG_SUBDIRS(libfoo)
-AC_CONFIG_SUBDIRS(libbar)
-AC_OUTPUT
-END
-
-cat >mycc <<'END'
-#! /bin/sh
-case ${1+"$@"} in
- *-print-multi-lib*)
- echo ".;"
- echo "debug;@g"
- exit 0 ;;
-esac
-gcc ${1+"$@"}
-END
-
-chmod +x mycc
-PATH=$(pwd)$PATH_SEPARATOR$PATH; export PATH
-
-cat >Makefile.am <<'EOF'
-SUBDIRS = @subdirs@
-EXTRA_DIST = config-ml.in symlink-tree
-check-all:
- test -f debug/libfoo/libfoo.a
- test -f debug/libbar/libbar.a
- test -f libfoo/libfoo.a
- test -f libbar/libbar.a
-EOF
-
-# libfoo tests multilib supports when there are no subdirectories
-# libbar tests multilib supports when there are subdirectories
-
-mkdir libfoo
-cp "$mldir"/multilib.am libfoo/
-
-cat >libfoo/configure.ac <<'END'
-AC_PREREQ(2.57)
-AC_INIT(libfoo, 0.1, nobody@localhost)
-AC_CONFIG_SRCDIR(foo.c)
-# Apparently it doesn't work to have auxdir=.. when
-# multilib uses symlinked trees.
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE
-AC_PROG_CC
-AM_PROG_AR
-AC_PROG_RANLIB
-AM_ENABLE_MULTILIB(Makefile,[..])
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
-END
-
-cat >libfoo/Makefile.am <<'END'
-noinst_LIBRARIES = libfoo.a
-libfoo_a_SOURCES = foo.c
-include $(top_srcdir)/multilib.am
-END
-
-: > libfoo/foo.c
-
-mkdir libbar
-cp "$mldir"/multilib.am libbar/
-
-cat >libbar/configure.ac <<'END'
-AC_PREREQ(2.57)
-AC_INIT(libbar, 0.1, nobody@localhost)
-# Apparently it doesn't work to have auxdir=.. when
-# multilib uses symlinked trees.
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE
-AC_PROG_CC
-AM_PROG_AR
-AC_PROG_RANLIB
-AM_ENABLE_MULTILIB(Makefile,[..])
-AC_CONFIG_FILES([Makefile sub/Makefile])
-AC_OUTPUT
-END
-
-cat >libbar/Makefile.am <<'END'
-SUBDIRS = sub
-noinst_LIBRARIES = libbar.a
-libbar_a_SOURCES = bar.c
-include $(top_srcdir)/multilib.am
-END
-
-mkdir libbar/sub
-echo 'include $(top_srcdir)/multilib.am' >libbar/sub/Makefile.am
-: > libbar/bar.c
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-cd libfoo
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-cd ..
-
-cd libbar
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-cd ..
-
-# Check VPATH builds
-mkdir build
-cd build
-../configure --enable-multilib CC=mycc
-$MAKE
-test -f debug/libfoo/libfoo.a
-test -f debug/libbar/libbar.a
-test -f libfoo/libfoo.a
-test -f libbar/libbar.a
-$MAKE install
-$MAKE distcleancheck
-
-# Check standard builds.
-cd ..
-# Why to I have to specify --with-target-subdir?
-./configure --enable-multilib --with-target-subdir=. CC=mycc
-$MAKE check
-DISTCHECK_CONFIGURE_FLAGS='--enable-multilib CC=mycc' $MAKE distcheck
-
-:
diff --git a/t/nodef.sh b/t/nodef.sh
index a9034fa30..979b906d6 100755
--- a/t/nodef.sh
+++ b/t/nodef.sh
@@ -22,7 +22,7 @@
# Do not upgrade this file to use the modern AC_INIT/AM_INIT_AUTOMAKE
# forms. The day these obsolete AC_INIT and AM_INIT_AUTOMAKE forms
# are dropped, just erase the file.
-# nodef2.sh contains the modern version of this test.
+# nodef2.test contains the modern version of this test.
# -------------------------------------------------------------------
# First, check that PACKAGE and VERSION are output by default.
diff --git a/t/nodep2.sh b/t/nodep2.sh
index df411b763..13d117465 100755
--- a/t/nodep2.sh
+++ b/t/nodep2.sh
@@ -30,12 +30,7 @@ AC_CONFIG_FILES([Makefile])
AC_PROG_CC
AC_PROG_CXX
AC_PROG_OBJC
-# FIXME: this is to cater to older autoconf; remove this once we
-# FIXME: automake requires Autoconf 2.65 or later.
-m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [
- AC_SUBST([OBJCXX], [whocares])
- AM_CONDITIONAL([am__fastdepOBJCXX], [whocares])
-])
+AC_PROG_OBJCXX
AM_PROG_AS
AM_PROG_GCJ
AM_PROG_UPC
diff --git a/t/objc-flags.sh b/t/objc-flags.sh
index e98a81128..2f65d467c 100755
--- a/t/objc-flags.sh
+++ b/t/objc-flags.sh
@@ -57,6 +57,6 @@ grep '\$(OBJCFLAGS).*\$(foo.*_OBJCFLAGS)' Makefile.in && exit 1
grep '\$(foo.*_OBJCFLAGS).*\$(AM_OBJCFLAGS)' Makefile.in && exit 1
./configure OBJCFLAGS=-UERROR
-$MAKE
+$MAKE
:
diff --git a/t/objc-megademo.sh b/t/objc-megademo.sh
index 876fecbf7..432902971 100755
--- a/t/objc-megademo.sh
+++ b/t/objc-megademo.sh
@@ -25,8 +25,6 @@ am_create_testdir=empty
cat > configure.ac << 'END'
AC_INIT([play], [1.3], [bug-automake@gnu.org])
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([play.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
@@ -87,13 +85,7 @@ END
## Run Autotools.
libtoolize
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
$AUTOHEADER
$AUTOCONF
$AUTOMAKE --add-missing
diff --git a/t/objcxx-basic.sh b/t/objcxx-basic.sh
index e00106d79..de94a48b6 100755
--- a/t/objcxx-basic.sh
+++ b/t/objcxx-basic.sh
@@ -30,19 +30,10 @@ grep "add .*'AC_PROG_OBJCXX'" stderr
rm -rf autom4te*.cache
cat >> configure.ac <<'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_PROG_OBJCXX
END
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
-
+$ACLOCAL
$AUTOMAKE
$EGREP '^\.SUFFIXES:.* \.mm( |$)' Makefile.in
diff --git a/t/objcxx-deps.sh b/t/objcxx-deps.sh
index fef4ac549..950663bfe 100755
--- a/t/objcxx-deps.sh
+++ b/t/objcxx-deps.sh
@@ -20,8 +20,6 @@
. ./defs || exit 1
cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_PROG_OBJCXX
AC_OUTPUT
END
@@ -50,13 +48,7 @@ int main (void)
}
END
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
diff --git a/t/objcxx-flags.sh b/t/objcxx-flags.sh
index 8f5df45cb..6e79fc59b 100755
--- a/t/objcxx-flags.sh
+++ b/t/objcxx-flags.sh
@@ -20,8 +20,6 @@
. ./defs || exit 1
cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_PROG_OBJCXX
AC_OUTPUT
END
@@ -50,14 +48,7 @@ for i in 2 4; do
END
done
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
-
+$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
@@ -67,6 +58,6 @@ grep '\$(OBJCXXFLAGS).*\$(foo.*_OBJCXXFLAGS)' Makefile.in && exit 1
grep '\$(foo.*_OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && exit 1
./configure OBJCXXFLAGS=-UERROR
-$MAKE
+$MAKE
:
diff --git a/t/objcxx-minidemo.sh b/t/objcxx-minidemo.sh
index e4e776789..cf62e31f6 100755
--- a/t/objcxx-minidemo.sh
+++ b/t/objcxx-minidemo.sh
@@ -21,8 +21,6 @@ required=native
. ./defs || exit 1
cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_PROG_OBJCXX
AC_CONFIG_HEADERS([config.h])
AC_OUTPUT
@@ -57,13 +55,7 @@ int main (void)
}
END
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
$AUTOCONF
$AUTOHEADER
$AUTOMAKE --add-missing
diff --git a/t/obsolete.sh b/t/obsolete.sh
deleted file mode 100755
index 2a21f54ed..000000000
--- a/t/obsolete.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure obsolete macros can be autoupdated.
-
-# We need the following indirection in case someone exported e.g.
-# AUTOUPDATE='autoupdate --verbose'.
-set x ${AUTOUPDATE-autoupdate}
-required=$2
-. ./defs || exit 1
-
-cat > configure.ac << 'END'
-AC_INIT
-END
-
-$PERL -ne '/AU_DEFUN\(\[(\w+)\]/ && print "$1\n"' \
- "$am_automake_acdir/obsolete.m4" > obs
-cat obs >> configure.ac
-$PERL -ne 'chomp; print "grep $_ output || exit 1\n"; ' obs > obs.1
-$PERL -ne 'chomp; print "grep $_ configure.ac && exit 1\n"; ' obs > obs.2
-echo : >> obs.1 # Since it will be sourced, it must end with a success.
-echo : >> obs.2 # Likewise.
-
-cat configure.ac # For debugging.
-cat obs.1 # Likewise.
-cat obs.2 # Likewise.
-
-# Sanity check. Make sure we have added something to configure.ac.
-test $(wc -l <configure.ac) -gt 1
-
-$ACLOCAL
-
-# Expect Autoconf to complain about each of the macros in obs.
-$AUTOCONF -Wobsolete >output 2>&1 || { cat output; exit 1; }
-cat output
-. ./obs.1
-# Make sure Autoupdate remove each of these macros.
-$AUTOUPDATE
-. ./obs.2
-
-# Autoconf should be able to grok the updated configure.ac.
-$AUTOCONF
-
-:
diff --git a/t/parallel-tests-driver-install.sh b/t/parallel-tests-driver-install.sh
index 994066187..e1a2248b0 100755
--- a/t/parallel-tests-driver-install.sh
+++ b/t/parallel-tests-driver-install.sh
@@ -15,19 +15,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check that auxiliary script 'test-driver' gets automatically installed
-# in the correct directory by 'parallel-tests' option.
+# in the correct directory.
+am_create_testdir=empty
. ./defs || exit 1
-: Try first with parallel-tests defined in AM_INIT_AUTOMAKE.
-
-mkdir am-init-automake
-cd am-init-automake
-
cat > configure.ac <<END
AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([my_aux_dir])
-AM_INIT_AUTOMAKE([parallel-tests])
+AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile sub/Makefile])
AC_OUTPUT
END
@@ -52,41 +48,6 @@ test -f my_aux_dir/test-driver
test ! -e test-driver
test ! -e sub/test-driver
-grep '^configure\.ac:3:.*installing.*my_aux_dir/test-driver' stderr
-
-cd ..
-
-: Now try with parallel-tests defined in AUTOMAKE_OPTIONS.
-
-mkdir automake-options
-cd automake-options
-
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([dir/GNUmakefile])
-AC_OUTPUT
-END
-
-mkdir build-aux dir
-
-cat > dir/GNUmakefile.am <<END
-TESTS = foo.test
-AUTOMAKE_OPTIONS = parallel-tests
-TESTS += bar.test
-END
-
-$ACLOCAL
-$AUTOMAKE --add-missing --copy dir/GNUmakefile 2>stderr \
- || { cat stderr >&2; exit 1; }
-cat stderr >&2
-
-ls -l . dir build-aux # For debugging.
-test -f build-aux/test-driver
-test ! -e test-driver
-test ! -e dir/test-driver
-
-grep '^dir/GNUmakefile\.am:2:.*installing.*build-aux/test-driver' stderr
+grep '^parallel-tests:.*installing.*my_aux_dir/test-driver' stderr
:
diff --git a/t/parallel-tests-dry-run-1.sh b/t/parallel-tests-dry-run-1.sh
index 376a81a42..96764c31e 100755
--- a/t/parallel-tests-dry-run-1.sh
+++ b/t/parallel-tests-dry-run-1.sh
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check parallel-tests interactions with "make -n".
+# Check interactions between the parallel test harness and "make -n".
# See also sister test 'parallel-tests-dry-run-2.sh'.
. ./defs || exit 1
diff --git a/t/parallel-tests-dry-run-2.sh b/t/parallel-tests-dry-run-2.sh
index d041d2d21..0d324d8ed 100755
--- a/t/parallel-tests-dry-run-2.sh
+++ b/t/parallel-tests-dry-run-2.sh
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check parallel-tests interactions with "make -n".
+# Check interactions between the parallel test harness and "make -n".
# See also sister test 'parallel-tests-dry-run-1.sh'.
. ./defs || exit 1
diff --git a/t/parallel-tests-interrupt.tap b/t/parallel-tests-interrupt.tap
index bce25b3be..76e89f26f 100755
--- a/t/parallel-tests-interrupt.tap
+++ b/t/parallel-tests-interrupt.tap
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that the parallel-tests driver removed incomplete log files
+# Check that the parallel testsuite harness removes incomplete log files
# when interrupt upon some signal. This test is definitely too hacky,
# but we couldn't find a better way to deal with inter-processes
# signals and the whole process-synchronization mess.
diff --git a/t/parallel-tests-no-color-in-log.sh b/t/parallel-tests-no-color-in-log.sh
index fe1036b07..c46993fef 100755
--- a/t/parallel-tests-no-color-in-log.sh
+++ b/t/parallel-tests-no-color-in-log.sh
@@ -27,7 +27,7 @@ END
cat >Makefile.am <<'END'
LOG_COMPILER = $(SHELL)
-AUTOMAKE_OPTIONS = color-tests parallel-tests
+AUTOMAKE_OPTIONS = color-tests
TESTS = pass fail skip xpass xfail error
XFAIL_TESTS = xpass xfail
END
diff --git a/t/parallel-tests-reset-term.sh b/t/parallel-tests-reset-term.sh
index 88a98522e..61cbad50b 100755
--- a/t/parallel-tests-reset-term.sh
+++ b/t/parallel-tests-reset-term.sh
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that the parallel-tests driver correctly handle overrides of the
+# Check that the testsuite harness correctly handle overrides of the
# TERM variable by either TESTS_ENVIRONMENT and AM_TESTS_ENVIRONMENT.
required='grep-nonprint'
diff --git a/t/parallel-tests-subdir.sh b/t/parallel-tests-subdir.sh
index d57133f97..b7bb481d1 100755
--- a/t/parallel-tests-subdir.sh
+++ b/t/parallel-tests-subdir.sh
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that the parallel-tests driver creates parent directories for
+# Check that the parallel test harness creates parent directories for
# the log files when needed.
. ./defs || exit 1
diff --git a/t/parallel-tests2.sh b/t/parallel-tests2.sh
deleted file mode 100755
index ae9bd38b6..000000000
--- a/t/parallel-tests2.sh
+++ /dev/null
@@ -1,146 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2009-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check parallel-tests features:
-# - check-html
-# - recheck-html
-# FIXME: the features tested by this script has been moved in contrib.
-# FIXME: We should move this script accordingly.
-
-. ./defs || exit 1
-
-# Try the variants that are tried in check-html.am.
-while :; do
- for r2h in $RST2HTML rst2html rst2html.py; do
- echo "$me: running $r2h --version"
- $r2h --version && break 2
- : For shells with busted 'set -e'.
- done
- skip_all_ "no proper rst2html program found"
-done
-unset r2h
-
-cp "$am_top_srcdir"/contrib/check-html.am . \
- || fatal_ "cannot fetch 'check-html.am' from contrib"
-
-cat >> configure.ac << 'END'
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-TEST_SUITE_LOG = mylog.log
-TESTS = foo.test bar.test baz.test
-check_SCRIPTS = bla
-bla:
- echo bla > $@
-CLEANFILES = bla
-include $(srcdir)/check-html.am
-END
-
-cat > foo.test <<'END'
-#! /bin/sh
-echo "this is $0"
-test -f bla || exit 1
-exit 0
-END
-
-cat > bar.test <<'END'
-#! /bin/sh
-echo "this is $0"
-exit 99
-END
-
-cat > baz.test <<'END'
-#! /bin/sh
-echo "this is $0"
-exit 1
-END
-
-chmod a+x foo.test bar.test baz.test
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure
-
-$MAKE check-html && exit 1
-test -f mylog.html
-# check-html should cause check_SCRIPTS to be created.
-test -f bla
-
-# "make clean" should remove HTML files.
-$MAKE clean
-test ! -e mylog.html
-test ! -e bla
-
-# Always create the HTML output, even if there were no failures.
-rm -f mylog.html
-env TESTS=foo.test $MAKE -e check-html
-test -f mylog.html
-
-# Create summarizing HTML output also with recheck-html.
-rm -f mylog.html
-env TESTS=foo.test $MAKE -e recheck-html
-test -f mylog.html
-
-# Create HTML output for an individual test.
-$MAKE foo.html
-grep 'this is .*foo\.test' foo.html
-test ! -e bar.html
-test ! -e baz.html
-
-# Create HTML output for individual tests. Since the pre-existing log
-# files are expected to be used for the HTML conversion, this should
-# go smoothly even for failed tests.
-$MAKE bar.html baz.html
-grep 'this is .*bar\.test' bar.html
-grep 'this is .*baz\.test' baz.html
-
-# HTML output removed by mostlyclean.
-$MAKE mostlyclean
-test ! -e foo.html
-test ! -e bar.html
-test ! -e baz.html
-test ! -e mylog.html
-
-# check-html and recheck-html should cause check_SCRIPTS to be created,
-# and recheck-html should rerun no tests if check has not been run.
-
-$MAKE clean
-test ! -e mylog.html
-env TEST_LOGS=foo.log $MAKE -e check-html
-test -f bla
-test -f foo.log
-test ! -e bar.log
-test ! -e baz.log
-test -f mylog.html
-
-$MAKE clean
-env TESTS=foo.test $MAKE -e recheck-html
-test -f bla
-test ! -e foo.log
-test -f mylog.html
-
-$MAKE clean
-$MAKE recheck-html
-test -f bla
-test ! -e foo.log
-test ! -e bar.log
-test ! -e baz.log
-test -f mylog.html
-
-:
diff --git a/t/perf/testsuite-summary.sh b/t/perf/testsuite-summary.sh
index 679a05a79..296a62102 100755
--- a/t/perf/testsuite-summary.sh
+++ b/t/perf/testsuite-summary.sh
@@ -45,7 +45,7 @@ for i in $(seq_ 1 $count); do
echo :test-result: PASS >> $i.trs
echo :copy-in-global-log: yes >> $i.trs
echo TESTS += $i.t
-done >> Makefile.am
+done >> Makefile.am
# Re-enable shell traces.
set -x
diff --git a/t/primary-prefix-invalid-couples.tap b/t/primary-prefix-invalid-couples.tap
index dadf38dcd..86d766505 100755
--- a/t/primary-prefix-invalid-couples.tap
+++ b/t/primary-prefix-invalid-couples.tap
@@ -29,7 +29,6 @@ oIFS=$IFS # Saved for later.
: > ar-lib
: > ltmain.sh
: > texinfo.tex
-: > elisp-comp
: > py-compile
: > config.guess
: > config.sub
diff --git a/t/primary-prefix-valid-couples.sh b/t/primary-prefix-valid-couples.sh
index e1e3c7791..d8cbc30a2 100755
--- a/t/primary-prefix-valid-couples.sh
+++ b/t/primary-prefix-valid-couples.sh
@@ -41,7 +41,6 @@ END
echo '@setfilename foo' > foo.texi
: > texinfo.tex
: > py-compile
-: > elisp-comp
: > ar-lib
# Setup Makefile.am.
diff --git a/t/recurs-user-deeply-nested.sh b/t/recurs-user-deeply-nested.sh
new file mode 100755
index 000000000..c9e5c1f5c
--- /dev/null
+++ b/t/recurs-user-deeply-nested.sh
@@ -0,0 +1,97 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that recursion on user-defined targets can be made to work
+# with "deeply" nested uses of $(SUBDIRS).
+
+. ./defs || exit 1
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([
+ sub1/Makefile
+ sub1/sub2/Makefile
+ sub1/sub2/sub3/Makefile
+ sub1/sub2/sub3/sub4/Makefile
+])
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_OUTPUT
+END
+
+dirs='sub1 sub1/sub2 sub1/sub2/sub3 sub1/sub2/sub3/sub4'
+
+mkdir $dirs
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1
+
+foo-local:
+ cp sub1/foo foo
+MOSTLYCLEANFILES = foo
+
+.PHONY: test
+test:
+ echo 'It works!' > exp
+ diff exp foo
+ diff exp sub1/foo
+ test ! -f sub1/sub2/foo
+ test ! -f sub1/sub2/sub3/foo
+ diff exp sub1/sub2/sub3/sub4/foo
+ rm -f exp
+
+all-local: foo
+check-local: test
+END
+
+cat > sub1/Makefile.am <<'END'
+SUBDIRS = sub2
+foo-local:
+ test ! -f sub2/sub3/foo
+ cp sub2/sub3/sub4/foo foo
+MOSTLYCLEANFILES = foo
+END
+
+# Here we deliberately lack an explicit definition the 'foo-local'
+# target; that shouldn't stop 'foo' recursion into subdirectory
+# 'sub3/sub4'.
+echo SUBDIRS = sub3 > sub1/sub2/Makefile.am
+echo SUBDIRS = sub4 > sub1/sub2/sub3/Makefile.am
+
+cat > sub1/sub2/sub3/sub4/Makefile.am <<'END'
+foo-local:
+ echo 'It works!' > foo
+MOSTLYCLEANFILES = foo
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for d in $dirs; do
+ $FGREP foo-am $d/Makefile.in || exit 1
+ case $d in
+ */sub4);;
+ *) $FGREP foo-recursive $d/Makefile.in || exit 1;;
+ esac
+done
+
+./configure
+
+$MAKE foo
+$MAKE test
+
+$MAKE distcheck
+
+:
diff --git a/t/recurs-user-indir.sh b/t/recurs-user-indir.sh
new file mode 100755
index 000000000..01d98a722
--- /dev/null
+++ b/t/recurs-user-indir.sh
@@ -0,0 +1,99 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that user recursion works with various types of indirections
+# *involved in the definition of the '*-local' targets*: make macros,
+# AC_SUBST'd strings, automake-time file inclusions, automake
+# conditionals...
+
+. ./defs || exit 1
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([
+ sub1/Makefile
+ sub1/subsub/Makefile
+ sub2/Makefile
+ sub2/subsub/Makefile
+])
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_SUBST([FOO_LOCAL], [foo-local])
+AM_CONDITIONAL([COND], [:])
+AC_OUTPUT
+END
+
+mkdir sub1 sub1/subsub sub2 sub2/subsub
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 sub2
+AM_FOO_LOCAL = foo-local
+
+$(AM_FOO_LOCAL):
+ pwd && : > foo
+CLEANFILES = foo
+
+all-local: foo
+check-local:
+ test -f foo
+ test -f sub1/foo
+ test -f sub1/subsub/foo
+ test -f sub2/foo
+ test -f sub2/subsub/foo
+ test ! -r sub2/subsub/bar
+END
+
+cat > sub1/Makefile.am <<'END'
+SUBDIRS = subsub
+@FOO_LOCAL@:
+ pwd && : > foo
+CLEANFILES = foo
+END
+
+cat > sub1/subsub/Makefile.am <<'END'
+$(FOO_LOCAL):
+ pwd && : > foo
+CLEANFILES = foo
+END
+
+cat > sub2/Makefile.am <<'END'
+include $(srcdir)/bar.am
+include $(srcdir)/baz.am
+CLEANFILES = foo
+END
+
+echo 'SUBDIRS = subsub' > sub2/bar.am
+echo 'foo-local: ; pwd && : > foo' > sub2/baz.am
+
+cat > sub2/subsub/Makefile.am <<'END'
+if COND
+foo-local:
+ pwd && : > foo
+CLEANFILES = foo
+else !COND
+foo-local:
+ pwd && : > bar
+endif !COND
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/t/recurs-user-keep-going.sh b/t/recurs-user-keep-going.sh
new file mode 100755
index 000000000..6c2d4328e
--- /dev/null
+++ b/t/recurs-user-keep-going.sh
@@ -0,0 +1,95 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that user recursion works with "make -k".
+
+. ./defs || exit 1
+
+cat >> configure.ac <<'END'
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_CONFIG_FILES([
+ sub1/Makefile
+ sub1/subsub1/Makefile
+ sub2/Makefile
+ sub2/subsub2/Makefile
+ sub3/Makefile
+])
+FAIL='@echo "FAIL $@ in `pwd`"; exit 1'
+PASS='@echo "PASS $@ in `pwd`"; : > foo'
+AC_SUBST([FAIL])
+AC_SUBST([PASS])
+AC_OUTPUT
+END
+
+mkdir sub1 sub1/subsub1 sub2 sub2/subsub2 sub3
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 . sub2 sub3
+foo-local:; @FAIL@
+END
+
+cat > sub1/Makefile.am <<'END'
+SUBDIRS = subsub1
+foo-local:; @PASS@
+END
+
+cat > sub2/Makefile.am <<'END'
+SUBDIRS = subsub2
+foo-local:; @FAIL@
+END
+
+echo 'foo-local:; @FAIL@' > sub1/subsub1/Makefile.am
+echo 'foo-local:; @PASS@' > sub2/subsub2/Makefile.am
+echo 'foo-local:; @PASS@' > sub3/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+cat > exp <<END
+./sub1/foo
+./sub2/subsub2/foo
+./sub3/foo
+END
+
+as_expected ()
+{
+ find . -name foo > t || { cat t; exit 1; }
+ LC_ALL=C sort t > got
+ cat exp
+ cat got
+ diff exp got
+}
+
+# Without "-k", we fail in 'sub1/subsub1', and do nothing else.
+# So, no 'foo' file gets created.
+$MAKE foo && exit 1
+find . -name foo | grep . && exit 1
+
+if using_gmake; then
+ $MAKE -k foo && exit 1
+ as_expected
+ $MAKE --keep-going foo && exit 1
+ as_expected
+else
+ # Don't trust the exit status of 'make -k' for non-GNU makes.
+ $MAKE -k foo || :
+ as_expected
+fi
+
+:
diff --git a/t/recurs-user-many.sh b/t/recurs-user-many.sh
new file mode 100755
index 000000000..c1e475722
--- /dev/null
+++ b/t/recurs-user-many.sh
@@ -0,0 +1,73 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that many user-defined recursive targets can be supported
+# at once, and that calls to 'AM_EXTRA_RECURSIVE_TARGETS' are
+# cumulative.
+
+. ./defs || exit 1
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+## NOTE: extra white spaces, tabs, newlines and backslashes in the
+## lines below: on purpose.
+AM_EXTRA_RECURSIVE_TARGETS([ foo \
+ bar ])
+AC_SUBST([CLEANFILES], ['foo bar baz'])
+AC_OUTPUT
+# Yes, this appears after AC_OUTPUT. So what?
+AM_EXTRA_RECURSIVE_TARGETS([baz])
+END
+
+mkdir sub
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+foo-local:
+ : > foo
+bar-local:
+ echo x > bar
+baz-local: ; touch baz
+check-local: foo bar baz
+ ls -l . sub ;: For debugging.
+ test -f foo
+ test -f bar
+ test -f baz
+ test -f sub/foo
+ test -f sub/bar
+ test -f sub/baz
+END
+
+cat > sub/Makefile.am <<'END'
+foo-local bar-local baz-local:
+ touch `echo $@ | sed 's/-local$$//'`
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for t in foo bar baz; do
+ $FGREP "$t-am" Makefile.in
+ $FGREP "$t-am" sub/Makefile.in
+done
+
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/t/silent-amopts.sh b/t/recurs-user-no-subdirs.sh
index c7414537b..ed56d07f7 100755
--- a/t/silent-amopts.sh
+++ b/t/recurs-user-no-subdirs.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#! /bin/sh
# Copyright (C) 2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -14,15 +14,39 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that automake complaints if the 'silent-rules' option is
-# used in AUTOMAKE_OPTIONS.
+# Check that user recursion can be made to work even when $(SUBDIRS)
+# is empty or undefined.
. ./defs || exit 1
-echo AUTOMAKE_OPTIONS = silent-rules > Makefile.am
+cat >> configure.ac <<'END'
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_OUTPUT
+END
$ACLOCAL
-AUTOMAKE_fails
-grep "^Makefile\.am:1:.*'silent-rules'.*AM_INIT_AUTOMAKE" stderr
+$AUTOCONF
+
+# First try with undefined $(SUBDIRS).
+cat > Makefile.am <<'END'
+all-local: foo
+foo-local:
+ : > bar
+MOSTLYCLEANFILES = bar
+END
+$AUTOMAKE
+./configure
+$MAKE foo
+test -f bar
+
+$MAKE distclean
+test ! -r bar # Sanity check.
+
+# Now try with empty but defined $(SUBDIRS).
+echo SUBDIRS = >> Makefile.am
+$AUTOMAKE
+./configure
+$MAKE foo
+test -f bar
:
diff --git a/t/cygnus-check-without-all.sh b/t/recurs-user-no-top-level.sh
index ec8771854..f80010aa1 100755
--- a/t/cygnus-check-without-all.sh
+++ b/t/recurs-user-no-top-level.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2012 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
@@ -14,37 +14,37 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that, in cygnus mode, target "check" does not depend target
-# "all".
+# Check that user recursion works even for targets that don't exist
+# in the top-level Makefile.
. ./defs || exit 1
cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
+AC_CONFIG_FILES([sub/Makefile])
+AM_EXTRA_RECURSIVE_TARGETS([foo-bar])
AC_OUTPUT
END
+mkdir sub
+
cat > Makefile.am <<'END'
-all-local:
- : > all-target-has-failed
- exit 1
-check-local:
- touch check-target-has-run
+SUBDIRS = sub
+all-local: foo-bar
END
-$ACLOCAL
-$AUTOMAKE --cygnus -Wno-obsolete
-
-$EGREP '(^| )all.*(:|:.* )check' Makefile.in && exit 1
+cat > sub/Makefile.am <<'END'
+foo-bar-local:
+ : > foo-bar
+MOSTLYCLEANFILES = foo-bar
+END
+$ACLOCAL
$AUTOCONF
+$AUTOMAKE
+
./configure
-$MAKE check
-test -f check-target-has-run
-test ! -e all-target-has-failed
-# Sanity checks.
-$MAKE && exit 1
-test -f all-target-has-failed
+$MAKE foo-bar
+test -f sub/foo-bar
:
diff --git a/t/recurs-user-override.sh b/t/recurs-user-override.sh
new file mode 100755
index 000000000..64ef2eec2
--- /dev/null
+++ b/t/recurs-user-override.sh
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that override of user-defined recursive targets work as
+# expected.
+
+. ./defs || exit 1
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+AM_EXTRA_RECURSIVE_TARGETS([foobar zardoz])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+all-local: foobar zardoz
+foobar:
+ : > foobar.out
+MOSTLYCLEANFILES = foobar.out
+check-local:
+ test -f foobar.out
+ test ! -r sub/foobar.out
+ test -f sub/zardoz.out
+ test ! -r sub/baz.out
+END
+
+mkdir sub
+cat > sub/Makefile.am <<'END'
+foobar foobar-local:
+ : > foobar.out
+zardoz-local:
+ : > baz.out
+zardoz:
+ : > zardoz.out
+MOSTLYCLEANFILES = zardoz.out
+END
+
+$ACLOCAL
+$AUTOCONF
+
+AUTOMAKE_fails
+grep '^Makefile\.am:3:.*user target.*foobar' stderr
+grep '^Makefile\.am:.*foobar-local.*instead of foobar$' stderr
+grep '^sub/Makefile\.am:5:.*user target.*zardoz' stderr
+grep '^sub/Makefile\.am:.*zardoz-local.*instead of zardoz$' stderr
+
+$AUTOMAKE -Wno-override
+
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/t/cygnus-requires-maintainer-mode.sh b/t/recurs-user-phony.sh
index 978df8cf4..29e50a89b 100755
--- a/t/cygnus-requires-maintainer-mode.sh
+++ b/t/recurs-user-phony.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2012 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
@@ -14,40 +14,51 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that, in cygnus mode, maintainer mode is required.
+# Check that user-defined recursive targets and their associate
+# '-local', '-am' and '-recursive' targets are declared as phony.
+# Require GNU make, because some vendo makes (e.g., Solaris) doesn't
+# truly respect .PHONY.
+required=GNUmake
. ./defs || exit 1
-: > Makefile.am
-
-$ACLOCAL
-AUTOMAKE_fails -Wno-obsolete --cygnus
-grep '^configure\.ac:.*AM_MAINTAINER_MODE.*required.*cygnus' stderr
-
cat >> configure.ac <<'END'
AC_CONFIG_FILES([sub/Makefile])
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_OUTPUT
END
cat > Makefile.am <<'END'
SUBDIRS = sub
+foo-local:
+ echo 'GOOD!' > foo
END
mkdir sub
cat > sub/Makefile.am <<'END'
-AUTOMAKE_OPTIONS = -Wno-obsolete cygnus
+foo-local:
+ echo 'GOOD!' > foo
END
-rm -rf autom4te.cache
+dummy_files='
+ foo
+ foo-local
+ foo-am
+ foo-recursive
+ sub/foo
+ sub/foo-local
+ sub/foo-am
+'
+
$ACLOCAL
-AUTOMAKE_fails
-grep '^configure\.ac:.*AM_MAINTAINER_MODE.*required.*cygnus' stderr
+$AUTOCONF
+$AUTOMAKE
+./configure
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-END
+touch $dummy_files
-rm -rf autom4te.cache
-$ACLOCAL
-$AUTOMAKE --cygnus -Wno-obsolete
+$MAKE foo
+grep 'GOOD!' foo
+grep 'GOOD!' sub/foo
:
diff --git a/t/clean2.sh b/t/recurs-user-wrap.sh
index ce5e9bf48..9c4e3758e 100755
--- a/t/clean2.sh
+++ b/t/recurs-user-wrap.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2012 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
@@ -14,55 +14,46 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure distclean works in cygnus mode.
-# Report from Daniel Jacobowitz.
+# Check that rules generated by user recursion are apt to be wrapped
+# by other makefiles.
+required=GNUmake
. ./defs || exit 1
cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-AC_CONFIG_FILES([sub/Makefile])
+AM_EXTRA_RECURSIVE_TARGETS([extra])
+AC_CONFIG_FILES([src/Makefile])
AC_OUTPUT
END
-cat > Makefile.am << 'END'
-SUBDIRS = sub
+mkdir src
+echo SUBDIRS = src > Makefile.am
+echo 'bar: ; : > $@ ' > src/Makefile.am
-data_DATA = bar
-
-bar:
- touch $@
-
-DISTCLEANFILES = bar
-END
-
-mkdir sub
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
-cat > sub/Makefile.am << 'END'
-data_DATA = foo
+./configure
-foo:
- touch $@
+$MAKE extra
+test ! -f extra-local
+test ! -f src/bar
-CLEANFILES = $(data_DATA)
+cat > GNUmakefile << 'END'
+.DEFAULT_GOAL = all
+extra-local:
+ : > $@
+include ./Makefile
END
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --cygnus -Wno-obsolete
+cat > src/GNUmakefile << 'END'
+include ./Makefile
+extra-local: bar
+END
-./configure
-$MAKE
-ls -l
-test -f bar
-test -f sub/foo
-$MAKE distclean
-ls -l
-test ! -e bar
-test ! -e sub/foo
-test ! -e Makefile
-test ! -e config.status
-test -f Makefile.in
-test -f configure
+$MAKE extra
+test -f extra-local
+test -f src/bar
:
diff --git a/t/recurs-user.sh b/t/recurs-user.sh
new file mode 100755
index 000000000..34a3fd25e
--- /dev/null
+++ b/t/recurs-user.sh
@@ -0,0 +1,81 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Basic checks on user-defined recursive rules.
+# Check that user recursion respect $(SUBDIRS) order,
+# and proceeds in a depth-first fashion.
+
+. ./defs || exit 1
+
+cat >> configure.ac <<'END'
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_CONFIG_FILES([
+ sub1/Makefile
+ sub2/Makefile
+ sub3/Makefile
+ sub3/deeper/Makefile
+])
+AC_OUTPUT
+END
+
+mkdir sub1 sub2 sub3 sub3/deeper
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 . sub3 sub2
+foo-local:
+ echo '.' >> $(top_builddir)/got
+.PHONY: test
+test: foo
+ cat $(srcdir)/exp
+ cat ./got
+ diff $(srcdir)/exp ./got
+check-local: test
+MOSTLYCLEANFILES = got
+EXTRA_DIST = exp
+END
+
+for i in 1 2 3; do
+ cat > sub$i/Makefile.am <<END
+foo-local:
+ echo 'sub$i' >> \$(top_builddir)/got
+END
+done
+
+echo SUBDIRS = deeper >> sub3/Makefile.am
+
+cat >> sub3/deeper/Makefile.am <<'END'
+foo-local:
+ echo sub3/deeper >> $(top_builddir)/got
+END
+
+cat >> exp <<'END'
+sub1
+.
+sub3/deeper
+sub3
+sub2
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE test
+$MAKE distcheck
+
+:
diff --git a/t/recurs-user2.sh b/t/recurs-user2.sh
new file mode 100755
index 000000000..0e4cba5ab
--- /dev/null
+++ b/t/recurs-user2.sh
@@ -0,0 +1,103 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that user recursion can be made to work when $(SUBDIRS) are
+# not "strictly" nested, as in e.g.:
+# SUBDIRS = src external/lib external/tests
+# with no Makefile in 'external'.
+
+. ./defs || exit 1
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES(
+ sub1/Makefile
+ sub2/Makefile
+dnl There's deliberately no 'sub3/Makefile'.
+ sub3/subsub/Makefile
+ sub4/Makefile
+ sub4/subsub/Makefile
+)
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_OUTPUT
+END
+
+mkdir sub1 sub2 sub3 sub4 sub3/subsub sub4/subsub
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 sub2 sub3/subsub sub4 sub4/subsub
+
+foo-local:
+ echo _rootdir_ >foo
+MOSTLYCLEANFILES = foo
+
+.PHONY: test
+test: foo
+ grep _rootdir_ foo
+ grep ':sub1:' sub1/foo
+ grep ',sub1,' sub1/bar
+ test ! -r sub2/foo
+ test ! -r sub3/foo
+ grep '%sub3/subsub%' sub3/subsub/quux
+ test ! -r sub3/subsub/foo
+ test ! -r sub4/foo
+ grep '=sub4/subsub=' sub4/subsub/foo
+
+check-local: test
+END
+
+# A 'foo-local' target with dependencies shouldn't cause problems.
+cat > sub1/Makefile.am <<'END'
+foo-local: bar
+ sed 's/,/:/g' bar >foo
+bar:
+ echo ',sub1,' >$@
+MOSTLYCLEANFILES = foo bar
+END
+
+# The lack of a 'foo' target here shouldn't cause any error in
+# automake nor in make.
+: > sub2/Makefile.am
+
+# The lack of file 'sub3/Makefile.am' shouldn't cause any problem either.
+rm -f sub3/Makefile.am
+
+# A 'foo-local' creating a file != 'foo' shouldn't cause any problem.
+cat > sub3/subsub/Makefile.am <<'END'
+foo-local:
+ echo '%sub3/subsub%' >quux
+MOSTLYCLEANFILES = quux
+END
+
+# No 'foo-local' nor 'foo' target here ...
+: > sub4/Makefile.am
+# ... should not cause errors, nor cause the 'foo-local' target
+# here not to be executed.
+cat > sub4/subsub/Makefile.am <<'END'
+foo-local:
+ echo '=sub4/subsub=' >foo
+MOSTLYCLEANFILES = foo
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE test
+$MAKE distcheck
+
+:
diff --git a/t/missing4.sh b/t/remake-aclocal-version-mismatch.sh
index 22d31d0b2..22d31d0b2 100755
--- a/t/missing4.sh
+++ b/t/remake-aclocal-version-mismatch.sh
diff --git a/t/remake-include-aclocal.sh b/t/remake-include-aclocal.sh
index df1870e19..da0a0703d 100755
--- a/t/remake-include-aclocal.sh
+++ b/t/remake-include-aclocal.sh
@@ -32,13 +32,13 @@ else
fi
cat >> configure.ac <<END
+AC_CONFIG_MACRO_DIR([m4])
FINGERPRINT='my_fingerprint'
AC_SUBST([FINGERPRINT])
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
.PHONY: nil
nil:
## Used by "make distcheck" later.
@@ -51,7 +51,7 @@ END
mkdir m4
echo 'AC_DEFUN([my_fingerprint], [BadBadBad])' > m4/foo.m4
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/remake-macrodir.sh b/t/remake-macrodir.sh
new file mode 100755
index 000000000..61ac1979c
--- /dev/null
+++ b/t/remake-macrodir.sh
@@ -0,0 +1,83 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the aclocal honouring of AC_CONFIG_MACRO_DIR interacts
+# nicely with automatic rebuild rules.
+
+. ./defs || exit 1
+
+cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([macro-dir])
+my__FOO || AS_EXIT([1])
+AC_OUTPUT
+END
+
+: > Makefile.am
+
+mkdir macro-dir
+cat > macro-dir/foo.m4 <<'END'
+AC_DEFUN([my__FOO], [: > bar])
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+$FGREP my__FOO configure && exit 1
+
+./configure
+test -f bar
+rm -f bar
+
+$sleep
+
+cat > macro-dir/foo.m4 <<'END'
+AC_DEFUN([my__FOO], [: > baz])
+END
+
+$MAKE Makefile
+test -f baz
+test ! -r bar
+rm -f baz
+
+$sleep
+
+rm -f macro-dir/foo.m4
+cat > macro-dir/quux.m4 <<'END'
+AC_DEFUN([my__FOO], [: > quux])
+END
+
+$MAKE Makefile
+test -f quux
+test ! -r baz
+rm -f quux
+
+$sleep
+
+sed 's/^AC_CONFIG_MACRO_DIR/&([newdir])/' configure.ac > t
+mv -f t configure.ac
+
+mkdir newdir
+cat > newdir/mu.m4 <<'END'
+AC_DEFUN([my__FOO], [[: my__FOO do nothing]])
+END
+
+$MAKE Makefile
+$FGREP ': my__FOO do nothing' configure
+
+$MAKE distcheck
+
+:
diff --git a/t/remake-makefile-intree.sh b/t/remake-makefile-intree.sh
index cb7c425dc..3c4d45a9f 100755
--- a/t/remake-makefile-intree.sh
+++ b/t/remake-makefile-intree.sh
@@ -110,29 +110,29 @@ $MAKE distcheck
rm -f quux
-# Modify Makefile.am to add a directory of extra m4 files
-# considered by aclocal.
+# Modify configure.ac and aclocal.m4 to add a directory of extra m4
+# files considered by aclocal. Also update checks in Makefile.am.
+# Note that we won't use this new directory of extra m4 files in the
+# first rebuild below (but we will in the second).
$sleep
mkdir $srcdir/m4
cat > $srcdir/Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
+all-local: quux
check-local:
cat quux
grep '%Foo%' quux
test x'$(QUUX)' = x'%Foo%'
END
-$MAKE # This should place aclocal flags in Makefile.
-grep '.*-I m4' Makefile # Sanity check.
-
# Modify configure.ac and aclocal.m4.
$sleep
cat $srcdir/configure.stub - > $srcdir/configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([quux])
MY_CUSTOM_MACRO
AC_OUTPUT
diff --git a/t/remake-makefile-vpath.sh b/t/remake-makefile-vpath.sh
index 7e37fe856..737b04639 100755
--- a/t/remake-makefile-vpath.sh
+++ b/t/remake-makefile-vpath.sh
@@ -112,29 +112,29 @@ $MAKE distcheck
rm -f quux
-# Modify Makefile.am to add a directory of extra m4 files
-# considered by aclocal.
+# Modify configure.ac and aclocal.m4 to add a directory of extra m4
+# files considered by aclocal. Also update checks in Makefile.am.
+# Note that we won't use this new directory of extra m4 files in the
+# first rebuild below (but we will in the second).
$sleep
mkdir $srcdir/m4
cat > $srcdir/Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
+all-local: quux
check-local:
cat quux
grep '%Foo%' quux
test x'$(QUUX)' = x'%Foo%'
END
-$MAKE # This should place aclocal flags in Makefile.
-grep '.*-I m4' Makefile # Sanity check.
-
# Modify configure.ac and aclocal.m4.
$sleep
cat $srcdir/configure.stub - > $srcdir/configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([quux])
MY_CUSTOM_MACRO
AC_OUTPUT
diff --git a/t/remake-recurs-user.sh b/t/remake-recurs-user.sh
new file mode 100755
index 000000000..27e8bad64
--- /dev/null
+++ b/t/remake-recurs-user.sh
@@ -0,0 +1,89 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Remake rules and user-defined recursive rules.
+
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+m4_include([extra-targets.m4])
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+echo 'AM_EXTRA_RECURSIVE_TARGETS([foo])' > extra-targets.m4
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+all-local: foo
+foo-local:
+ : > foo
+bar-local:
+ : > bar
+MOSTLYCLEANFILES = foo
+END
+
+mkdir sub
+cat > sub/Makefile.am << 'END'
+foo-local:
+ : > foo2
+MOSTLYCLEANFILES = foo2
+bar-local: later-target
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+test -f foo
+test -f sub/foo2
+test ! -f bar
+test ! -f sub/zardoz
+$MAKE distcheck
+
+$sleep
+
+echo 'AM_EXTRA_RECURSIVE_TARGETS([bar])' >> extra-targets.m4
+
+cat >> Makefile.am <<'END'
+MOSTLYCLEANFILES += bar oof
+all-local: bar
+foo-local: oof
+oof:
+ : > $@
+END
+
+echo 'include $(srcdir)/more.am' >> sub/Makefile.am
+
+cat > sub/more.am << 'END'
+later-target:
+ : > zardoz
+DISTCLEANFILES = zardoz
+END
+
+using_gmake || $MAKE Makefile
+$MAKE
+test -f foo
+test -f oof
+test -f sub/foo2
+test -f bar
+test -f sub/zardoz
+$MAKE distcheck
+
+:
diff --git a/t/remake-subdir3.sh b/t/remake-subdir3.sh
index b6c580ca3..2146b381a 100755
--- a/t/remake-subdir3.sh
+++ b/t/remake-subdir3.sh
@@ -39,7 +39,7 @@ do_check ()
{
$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- test $(grep -c " --run " stdout) -eq 1
+ test $(grep -c "/missing " stdout) -eq 1
}
# Now, we are set up. Ensure that, for either missing Makefile.in,
diff --git a/t/req.sh b/t/req.sh
index cfeb44c1e..27b0ab1af 100755
--- a/t/req.sh
+++ b/t/req.sh
@@ -19,17 +19,12 @@
. ./defs || exit 1
cat > configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
AM_INIT_GUILE_MODULE
EOF
cat > acinclude.m4 << 'END'
-AC_DEFUN([AM_INIT_GUILE_MODULE],[
-. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-AC_CONFIG_AUX_DIR(..)
-module=[$1]
-AC_SUBST(module)])
+AC_DEFUN([AM_INIT_GUILE_MODULE], [AM_INIT_AUTOMAKE([whocares])])
END
$ACLOCAL
diff --git a/t/silent-configsite.sh b/t/silent-configsite.sh
index 4adc60137..c70d8c860 100755
--- a/t/silent-configsite.sh
+++ b/t/silent-configsite.sh
@@ -21,7 +21,7 @@
. ./defs || exit 1
cat >> configure.ac <<'EOF'
-AM_SILENT_RULES
+# This line will be edited later to force silent-rules default.
AC_OUTPUT
EOF
@@ -51,8 +51,9 @@ $MAKE distclean
: 'Disable by default in configure.ac, enable by default in config.site'
-sed 's/^AM_SILENT_RULES/&([no])/' configure.ac > configure.tmp
-mv -f configure.tmp configure.ac
+sed 's/.*silent-rules default.*/AM_SILENT_RULES([no])/' configure.ac > t
+diff t configure.ac && fatal_ "editing configure.ac"
+mv -f t configure.ac
$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
@@ -67,8 +68,9 @@ $MAKE distclean
: 'Enable by default in configure.ac, disable by default in config.site'
-sed 's/^AM_SILENT_RULES/&([yes])/' configure.ac > configure.tmp
-mv -f configure.tmp configure.ac
+sed 's/.*AM_SILENT_RULES.*/AM_SILENT_RULES([yes])/' configure.ac > t
+diff t configure.ac && fatal_ "editing configure.ac"
+mv -f t configure.ac
$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
diff --git a/t/silent-lex.sh b/t/silent-lex.sh
index ca2164f76..e9c6b5556 100755
--- a/t/silent-lex.sh
+++ b/t/silent-lex.sh
@@ -22,7 +22,6 @@ required='cc lex'
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AM_PROG_CC_C_O
AC_PROG_LEX
AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/silent-many-gcc.sh b/t/silent-many-gcc.sh
index 98104b649..2e5d203d7 100755
--- a/t/silent-many-gcc.sh
+++ b/t/silent-many-gcc.sh
@@ -95,7 +95,6 @@ do_and_check_verbose_build ()
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_F77
diff --git a/t/silent-many-generic.sh b/t/silent-many-generic.sh
index 6cbcbd708..7d18c5778 100755
--- a/t/silent-many-generic.sh
+++ b/t/silent-many-generic.sh
@@ -96,7 +96,6 @@ do_and_check_verbose_build ()
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AM_PROG_CC_C_O
AC_PROG_F77
AC_PROG_FC
diff --git a/t/silent-nowarn.sh b/t/silent-nowarn.sh
deleted file mode 100755
index 9eb759d6b..000000000
--- a/t/silent-nowarn.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2011-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that the 'silent-rules' mode suppresses the warnings for recursive
-# make variable expansions. This should happen regardless of whether and
-# where these warnings are requested.
-
-. ./defs || exit 1
-
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-# Yes, we repeat the warnings two times, both before and after
-# 'silent-rules'. This is deliberate.
-AM_INIT_AUTOMAKE([gnu -Wall -Wportability-recursive
- silent-rules
- -Wall -Wportability-recursive])
-AC_CONFIG_FILES([Makefile])
-END
-
-cat > Makefile.am <<'END'
-AUTOMAKE_OPTIONS = gnu -Wall -Wportability-recursive
-foo = $($(v)) $(x$(v)) $($(v)x) $(y$(v)z)
-END
-
-# Files required bu gnu strictness.
-touch AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS
-
-$ACLOCAL
-$AUTOMAKE --gnu -Wall -Wportability-recursive
-
-:
diff --git a/t/silent-obsolescent-warns.sh b/t/silent-obsolescent-warns.sh
deleted file mode 100755
index 38d845c91..000000000
--- a/t/silent-obsolescent-warns.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2009-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Some checks about silent-rules mode and warnings.
-
-. ./defs || exit 1
-
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-my_verbose = $(my_verbose_$(V))
-my_verbose_ = $(my_verbose_$(AM_DEFAULT_VERBOSITY))
-my_verbose_0 = @echo " PKG-GEN $@";
-foo: foo.in
- $(my_verbose)cp $(srcdir)/foo.in $@
-EOF
-
-$ACLOCAL
-$AUTOMAKE --add-missing
-
-cat > configure.ac <<'END'
-AC_INIT([silent6], [1.0])
-AM_INIT_AUTOMAKE([-Wall])
-AC_CONFIG_FILES([Makefile])
-END
-
-rm -rf autom4te*.cache
-$ACLOCAL
-AUTOMAKE_fails
-grep 'my_verbose_\$(V.*non-POSIX ' stderr
-$AUTOMAKE -Wno-error
-
-# AM_SILENT_RULES should turn off the warning.
-echo 'AM_SILENT_RULES' >> configure.ac
-rm -rf autom4te*.cache
-$ACLOCAL
-$AUTOMAKE
-grep 'AM_V_GEN' Makefile.in
-$AUTOMAKE --force -Wno-all -Wportability
-grep 'AM_V_GEN' Makefile.in
-
-# The 'silent-rules' option to AM_INIT_AUTOMAKE should work likewise.
-cat > configure.ac <<'END'
-AC_INIT([silent6], [1.0])
-AM_INIT_AUTOMAKE([silent-rules])
-AC_CONFIG_FILES([Makefile])
-END
-rm -rf autom4te*.cache
-$ACLOCAL
-$AUTOMAKE
-grep 'AM_V_GEN' Makefile.in
-$AUTOMAKE --force -Wno-all -Wportability
-grep 'AM_V_GEN' Makefile.in
-
-:
diff --git a/t/silent-yacc-headers.sh b/t/silent-yacc-headers.sh
index e89fe5af7..632404735 100755
--- a/t/silent-yacc-headers.sh
+++ b/t/silent-yacc-headers.sh
@@ -23,7 +23,6 @@ required='cc yacc'
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_YACC
AC_PROG_CC
AC_OUTPUT
diff --git a/t/silent-yacc.sh b/t/silent-yacc.sh
index c5729efe5..9283b325a 100755
--- a/t/silent-yacc.sh
+++ b/t/silent-yacc.sh
@@ -23,7 +23,6 @@ required='cc yacc'
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AM_PROG_CC_C_O
AC_PROG_YACC
AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/silent.sh b/t/silent.sh
index 5a12036c7..410e51c80 100755
--- a/t/silent.sh
+++ b/t/silent.sh
@@ -24,7 +24,6 @@ required=cc
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/t/silent2.sh b/t/silent2.sh
index 4e8fd6b82..25cf8b140 100755
--- a/t/silent2.sh
+++ b/t/silent2.sh
@@ -25,7 +25,6 @@ required=gcc
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/t/silent3.sh b/t/silent3.sh
index e4c043a19..f5dd83410 100755
--- a/t/silent3.sh
+++ b/t/silent3.sh
@@ -24,7 +24,6 @@ required='cc libtoolize'
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_AR
diff --git a/t/silent4.sh b/t/silent4.sh
index 15568fd99..8dcad3dfe 100755
--- a/t/silent4.sh
+++ b/t/silent4.sh
@@ -25,7 +25,6 @@ required="libtoolize gcc"
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_AR
diff --git a/t/silent6.sh b/t/silent6.sh
index 3593adf5d..a4b0f69f0 100755
--- a/t/silent6.sh
+++ b/t/silent6.sh
@@ -19,7 +19,6 @@
. ./defs || exit 1
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
EOF
@@ -31,6 +30,7 @@ echo SUBDIRS = sub > Makefile.am
mkdir sub
cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = -Wno-portability-recursive
my_verbose = $(my_verbose_$(V))
my_verbose_ = $(my_verbose_$(AM_DEFAULT_VERBOSITY))
my_verbose_0 = @echo " XGEN $@";
diff --git a/t/silent7.sh b/t/silent7.sh
index 898a4423b..5e5472e12 100755
--- a/t/silent7.sh
+++ b/t/silent7.sh
@@ -15,13 +15,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check user extensibility of silent-rules mode.
+# Aslo check that silent rules are disabled by default.
. ./defs || exit 1
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_OUTPUT
-EOF
+echo AC_OUTPUT >> configure.ac
cat > Makefile.am <<'EOF'
all-local: foo
@@ -41,7 +39,9 @@ $ACLOCAL
$AUTOMAKE --add-missing
$AUTOCONF
-./configure --disable-silent-rules
+# Silent rules are disabled by default, since we haven't called
+# "AM_SILENT_RULES([yes])" explicitly.
+./configure
$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
grep 'GEN ' stdout && exit 1
@@ -85,8 +85,4 @@ grep 'GEN ' stdout && exit 1
grep 'cp ' stdout
grep 'echo ' stdout
-# Ensure that setting 'silent-rules' in a Makefile.am produces an error.
-echo 'AUTOMAKE_OPTIONS = silent-rules' >> Makefile.am
-AUTOMAKE_fails --force
-
:
diff --git a/t/silent8.sh b/t/silent8.sh
index 76bf62c80..5d7b135d6 100755
--- a/t/silent8.sh
+++ b/t/silent8.sh
@@ -16,13 +16,10 @@
# Check texinfo rules in silent-rules mode.
-required='makeinfo-html tex texi2dvi-o dvips'
+required='makeinfo tex texi2dvi dvips'
. ./defs || exit 1
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_OUTPUT
-EOF
+echo AC_OUTPUT >> configure.ac
cat > Makefile.am <<'EOF'
info_TEXINFOS = foo.texi
diff --git a/t/silent9.sh b/t/silent9.sh
index 63441e9ab..8d0f6ea87 100755
--- a/t/silent9.sh
+++ b/t/silent9.sh
@@ -24,7 +24,6 @@ required='cc libtoolize'
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_CC_C_O
diff --git a/t/silentcxx-gcc.sh b/t/silentcxx-gcc.sh
index 1907e21d0..bafad6dcf 100755
--- a/t/silentcxx-gcc.sh
+++ b/t/silentcxx-gcc.sh
@@ -24,7 +24,6 @@ required=g++
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_CXX
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
diff --git a/t/silentcxx.sh b/t/silentcxx.sh
index 1cb9f26a7..fe4c9d4a9 100755
--- a/t/silentcxx.sh
+++ b/t/silentcxx.sh
@@ -25,7 +25,6 @@ required=c++
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_CXX
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
diff --git a/t/silentf77.sh b/t/silentf77.sh
index 580ec6d7d..e104a69d7 100755
--- a/t/silentf77.sh
+++ b/t/silentf77.sh
@@ -23,7 +23,6 @@ required=fortran77
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_F77
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
diff --git a/t/silentf90.sh b/t/silentf90.sh
index fb422fdb7..f0c470dba 100755
--- a/t/silentf90.sh
+++ b/t/silentf90.sh
@@ -23,7 +23,6 @@ required=fortran
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_FC
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
diff --git a/t/stamph2.sh b/t/stamph2.sh
index a6f589517..10c7d98b2 100755
--- a/t/stamph2.sh
+++ b/t/stamph2.sh
@@ -18,10 +18,9 @@
. ./defs || exit 1
cat >> configure.ac << END
-AM_CONFIG_HEADER([1.h
- 2.h:config.hin
- 3.h:sdir1/config1.hin])
-# AM_CONFIG_HEADER and AC_CONFIG_HEADERS should be synonyms.
+AC_CONFIG_HEADERS([1.h
+ 2.h:config.hin
+ 3.h:sdir1/config1.hin])
AC_CONFIG_HEADERS([sdir1/4.h
sdir1/5.h:config.hin
sdir1/6.h:sdir1/config1.hin
diff --git a/t/subdir-add2-pr46.sh b/t/subdir-add2-pr46.sh
index 7fa51b919..a4020525d 100755
--- a/t/subdir-add2-pr46.sh
+++ b/t/subdir-add2-pr46.sh
@@ -22,6 +22,7 @@
. ./defs || exit 1
cat >> configure.ac << 'END'
+AC_CONFIG_MACRO_DIR([m4])
m4_include([confiles.m4])
MORE_DEFS
AC_OUTPUT
@@ -31,7 +32,6 @@ echo 'AC_CONFIG_FILES([sub/Makefile])' > confiles.m4
cat > Makefile.am << 'END'
SUBDIRS = sub
-ACLOCAL_AMFLAGS = -I m4
END
mkdir sub
@@ -41,7 +41,7 @@ mkdir sub
mkdir m4
echo 'AC_DEFUN([MORE_DEFS], [])' > m4/moredefs.m4
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
./configure
diff --git a/t/subpkg.sh b/t/subpkg.sh
index c8ce125b6..d1c5ed3b6 100755
--- a/t/subpkg.sh
+++ b/t/subpkg.sh
@@ -29,6 +29,7 @@ AC_DEFUN([FOO],[
EOF
cat >>configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SUBDIRS([lib])
FOO
END
@@ -46,8 +47,6 @@ distdir = subpack-1
dist-hook:
test -f $(distdir)/LDADD.c
test -f $(top_distdir)/LDADD.c
-
-ACLOCAL_AMFLAGS = -I m4
EOF
cat >LDADD.c <<'EOF'
@@ -64,6 +63,7 @@ mkdir lib/src
cat >lib/configure.ac <<'EOF'
AC_INIT([lib], [2.3])
AM_INIT_AUTOMAKE
+AC_CONFIG_MACRO_DIR([../m4])
AM_PROG_AR
AC_PROG_RANLIB
AC_CONFIG_HEADERS([config.h:config.hin])
@@ -80,8 +80,6 @@ dist-hook:
test -f $(top_distdir)/LDADD.c
test -f $(distdir)/src/x.c
test ! -f $(top_distdir)/src/x.c
-
-ACLOCAL_AMFLAGS = -I ../m4
EOF
cat >lib/src/x.c <<'EOF'
@@ -92,12 +90,12 @@ int lib (void)
}
EOF
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE -Wno-override
cd lib
-$ACLOCAL -I ../m4
+$ACLOCAL
$FGREP 'm4_include([../m4/foo.m4])' aclocal.m4
$AUTOCONF
$AUTOHEADER
diff --git a/t/subpkg2.sh b/t/subpkg2.sh
index 8afcc5af9..ea95d5f01 100755
--- a/t/subpkg2.sh
+++ b/t/subpkg2.sh
@@ -28,6 +28,7 @@ AC_DEFUN([FOO],[
EOF
cat >>configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SUBDIRS([sub])
AC_OUTPUT
END
@@ -43,20 +44,21 @@ mkdir sub
cat >sub/configure.ac <<'EOF'
AC_INIT([sub], [2.3])
AM_INIT_AUTOMAKE
+AC_CONFIG_MACRO_DIR([../m4])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([script])
FOO
EOF
: >sub/script.in
-echo ACLOCAL_AMFLAGS = -I ../m4 > sub/Makefile.am
+: >sub/Makefile.am
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
cd sub
-$ACLOCAL -I ../m4
+$ACLOCAL
$FGREP 'm4_include([../m4/foo.m4])' aclocal.m4
$AUTOCONF
$AUTOMAKE -Wno-override
@@ -64,3 +66,5 @@ cd ..
./configure
$MAKE distcheck
+
+:
diff --git a/t/tap-doc2.sh b/t/tap-doc2.sh
index f874ff853..c2f0fa3f4 100755
--- a/t/tap-doc2.sh
+++ b/t/tap-doc2.sh
@@ -31,7 +31,7 @@ END
cat > configure.ac <<'END'
AC_INIT([GNU Try Tap], [1.0], [bug-automake@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([foreign parallel-tests -Wall -Werror])
+AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_CONFIG_FILES([Makefile])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_PROG_AWK
diff --git a/t/tap-realtime.sh b/t/tap-realtime.sh
index 92d78313b..fcac95fe5 100755
--- a/t/tap-realtime.sh
+++ b/t/tap-realtime.sh
@@ -53,7 +53,9 @@ fi
cat > Makefile.am << 'END'
TESTS = all.test
+AM_COLOR_TESTS= no
END
+
. tap-setup.sh
cat > all.test <<'END'
diff --git a/t/test-driver-is-distributed.sh b/t/test-driver-is-distributed.sh
index 2208a04d4..ede722794 100755
--- a/t/test-driver-is-distributed.sh
+++ b/t/test-driver-is-distributed.sh
@@ -23,31 +23,25 @@ am_create_testdir=empty
ocwd=$(pwd) || fatal_ "getting current working directory"
-do_check ()
-{
- whereopts=$1 auxdir=$2
- case $#,$whereopts in
- 2,ac) ac_opts=parallel-tests am_code= ;;
- 2,am) am_opts=parallel-tests ac_code= ;;
- *) fatal_ "do_check: bad usage";;
- esac
- mkdir $whereopts
- cd $whereopts
+for i in 1 2; do
+ mkdir D$i
+ cd D$i
+ if test $i -eq 1; then
+ auxdir=.
+ test_driver=test-driver
+ else
+ auxdir=build-aux
+ test_driver=$auxdir/test-driver
+ mkdir $auxdir
+ fi
mkdir tests
unindent > configure.ac << END
AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([$auxdir])
- AM_INIT_AUTOMAKE([$ac_opts])
+ AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile tests/Makefile])
AC_OUTPUT
END
- if test $auxdir = .; then
- test_driver=test-driver
- else
- mkdir $auxdir
- test_driver=$auxdir/test-driver
- fi
- # No 'AUTOMAKE_OPTIONS' in here -- purposely.
unindent > Makefile.am << END
SUBDIRS = tests
check-local: test-top
@@ -57,7 +51,6 @@ END
.PHONY: test-top
END
unindent > tests/Makefile.am << END
- AUTOMAKE_OPTIONS = $am_opts
check-local: test-sub
test-sub:
echo ' ' \$(DIST_COMMON) ' ' | grep '[ /]$test_driver '
@@ -84,10 +77,7 @@ END
$AUTOMAKE
diff Makefile.in Makefile.sav
diff tests/Makefile.in tests/Makefile.sav
- :
-}
-
-do_check ac .
-do_check am build-aux
+ cd "$ocwd" || fatal_ "cannot chdir back to '$ocwd'"
+done
:
diff --git a/t/test-metadata-global-log.sh b/t/test-metadata-global-log.sh
index 74bb6ffa5..54ecfb57b 100755
--- a/t/test-metadata-global-log.sh
+++ b/t/test-metadata-global-log.sh
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Custom test drivers and parallel-tests harness: check the documented
+# Custom test drivers and parallel test harness: check the documented
# semantics for deciding when the content of a test log file should be
# copied in the global test-suite.log file. Currently, this is done
# with the use of the reStructuredText field ':copy-in-global-log:' in
diff --git a/t/tests-environment-backcompat.sh b/t/tests-environment-backcompat.sh
index a5d888d4d..a82f2972f 100755
--- a/t/tests-environment-backcompat.sh
+++ b/t/tests-environment-backcompat.sh
@@ -16,7 +16,7 @@
# With old serial testsuite driver, TESTS_ENVIRONMENT can be used to
# define the "test runner", i.e. the program that the test scripts must
-# be run by (with the parallel-tests driver one should use LOG_COMPILER
+# be run by (with the parallel test harness one should use LOG_COMPILER
# for this). The behaviour tested here is also documented in the manual.
am_serial_tests=yes
diff --git a/t/txinfo-no-clutter.sh b/t/txinfo-no-clutter.sh
index 3de21b488..558f8e101 100755
--- a/t/txinfo-no-clutter.sh
+++ b/t/txinfo-no-clutter.sh
@@ -14,19 +14,28 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# The pdf, ps and dvi targets shouldn't let clutter in the build directory.
-# Related to automake bug#11146.
+# The info, html, pdf, ps and dvi targets shouldn't let clutter in the
+# build directory. Related to automake bug#11146.
-required='makeinfo tex texi2dvi-o dvips'
+required='makeinfo tex texi2dvi dvips'
. ./defs || exit 1
-mkdir sub
-
-echo AC_OUTPUT >> configure.ac
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
-all-local: ps pdf dvi html
-info_TEXINFOS = foo.texi sub/bar.texi
+all-local: ps pdf dvi html # For "make distcheck".
+info_TEXINFOS = foo.texi doc/bar.texi baz.texi
+SUBDIRS = sub
+END
+
+mkdir sub doc
+
+cat > sub/Makefile.am << 'END'
+all-local: ps pdf dvi html # For "make distcheck".
+info_TEXINFOS = baz.texi
END
cat > foo.texi << 'END'
@@ -39,7 +48,7 @@ Hello walls.
@bye
END
-cat > sub/bar.texi << 'END'
+cat > doc/bar.texi << 'END'
\input texinfo
@setfilename bar.info
@settitle bar
@@ -53,15 +62,6 @@ cat > baz.texi << 'END'
\input texinfo
@setfilename baz.info
@settitle baz
-@node Top
-Hello walls.
-@bye
-END
-
-cat > baz.texi << 'END'
-\input texinfo
-@setfilename baz.info
-@settitle baz
@defindex au
@defindex sa
@defindex sb
@@ -81,6 +81,8 @@ sb
@bye
END
+cp baz.texi sub
+
$ACLOCAL
$AUTOMAKE --add-missing
$AUTOCONF
@@ -91,10 +93,53 @@ $AUTOCONF
# clean up potential cruft left by earlier ones.
for fmt in info pdf ps dvi html all; do
$MAKE $fmt
- ls -l . sub # For debugging.
- ls -d foo* baz* sub/bar* > lst
- $EGREP -v '^(foo|sub/bar|baz)\.(texi|dvi|ps|pdf|html|info)$' lst && exit 1
- $MAKE clean
+ # For debugging.
+ ls -l . doc sub
+ # Sanity check.
+ case $fmt in
+ html)
+ test -e foo.html
+ test -e doc/bar.html
+ test -e baz.html
+ test -e sub/baz.html
+ ;;
+ all)
+ for x in info pdf ps dvi; do
+ test -f foo.$x
+ test -f doc/bar.$x
+ test -f baz.$x
+ test -f sub/baz.$x
+ done
+ test -e foo.html
+ test -e doc/bar.html
+ test -e baz.html
+ test -e sub/baz.html
+ ;;
+ *)
+ test -f foo.$fmt
+ test -f doc/bar.$fmt
+ test -f baz.$fmt
+ test -f sub/baz.$fmt
+ ;;
+ esac
+ # Real test.
+ ls -d foo* baz* sub/baz* doc/bar* > lst
+ basename_rx='(foo|doc/bar|baz|sub/baz)'
+ case $fmt in
+ pdf) extension_rx="(texi|pdf|t2p)";;
+ dvi) extension_rx="(texi|dvi|t2d)";;
+ ps) extension_rx="(texi|ps|dvi|t2d)";;
+ info) extension_rx="(texi|info)";;
+ html) extension_rx="(texi|html)";;
+ all) extension_rx="(texi|html|info|pdf|ps|dvi|t2[pd])";;
+ *) fatal_ "unreachable code reached";;
+ esac
+ $EGREP -v "^$basename_rx\.$extension_rx$" lst && exit 1
+ # Cleanup for checks on the next format.
+ case $fmt in
+ info) rm -f *.info doc/*.info sub/*.info;;
+ *) $MAKE clean;;
+ esac
done
$MAKE distcheck
diff --git a/t/txinfo13.sh b/t/txinfo13.sh
index 53a2ee7ba..a98254c38 100755
--- a/t/txinfo13.sh
+++ b/t/txinfo13.sh
@@ -18,7 +18,7 @@
# Also make sure we do not distribute too much foo.info* files (Report
# from Vincent Lefevre).
-required='makeinfo tex texi2dvi-o'
+required='makeinfo tex texi2dvi'
. ./defs || exit 1
echo AC_OUTPUT >> configure.ac
diff --git a/t/txinfo21.sh b/t/txinfo21.sh
index 5a3da1595..b6c222f19 100755
--- a/t/txinfo21.sh
+++ b/t/txinfo21.sh
@@ -17,7 +17,7 @@
# Test support for building HTML documentation, and the many
# install-DOC flavors.
-required='makeinfo-html tex texi2dvi'
+required='makeinfo tex texi2dvi'
. ./defs || exit 1
cat >>configure.ac <<\EOF
@@ -34,6 +34,7 @@ AC_OUTPUT
EOF
cat > Makefile.am << 'END'
+check-local: ps pdf dvi html # For "make distcheck".
SUBDIRS = rec
info_TEXINFOS = main.texi sub/main2.texi
END
@@ -75,13 +76,15 @@ install-pdf-local:
:> "$(pdfdir)/hello"
uninstall-local:
rm -f "$(pdfdir)/hello"
+
+check-local: ps pdf dvi html # For "make distcheck".
END
$ACLOCAL
$AUTOMAKE --add-missing
$AUTOCONF
-./configure
+./configure --prefix "$(pwd)"
$MAKE
@@ -115,17 +118,20 @@ test ! -e sub/main2.html
test ! -e rec/main3.html
# Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO.
+
+cp Makefile.am Makefile.sav
cat >>Makefile.am <<\EOF
AM_MAKEINFOHTMLFLAGS = --no-headers --no-split
AM_MAKEINFOFLAGS = --unsupported-option
EOF
$AUTOMAKE
-./configure --prefix "$(pwd)"
+./config.status Makefile
$MAKE html
test -f main.html
test -f sub/main2.html
test -d rec/main3.html
+
$MAKE clean
test ! -e main.html
test ! -e sub/main2.html
@@ -174,4 +180,11 @@ test ! -e share/$me/pdf/main2.pdf
test ! -e share/$me/pdf/main3.pdf
test ! -e share/$me/pdf/hello
+# Restore the makefile without a broken AM_MAKEINFOFLAGS definition.
+mv -f Makefile.sav Makefile.am
+$AUTOMAKE
+./config.status Makefile
+
+$MAKE distcheck
+
:
diff --git a/t/txinfo23.sh b/t/txinfo23.sh
index 294370bd8..c2d582a86 100755
--- a/t/txinfo23.sh
+++ b/t/txinfo23.sh
@@ -19,7 +19,7 @@
# (Similar to txinfo13.sh, plus DISTCLEANFILES).
# (See also txinfo24.sh and txinfo25.sh).
-required='makeinfo tex texi2dvi-o'
+required='makeinfo tex texi2dvi'
. ./defs || exit 1
cat >> configure.ac << 'END'
diff --git a/t/txinfo24.sh b/t/txinfo24.sh
index ae3e8abb6..697921508 100755
--- a/t/txinfo24.sh
+++ b/t/txinfo24.sh
@@ -18,7 +18,7 @@
# (Similar to txinfo16.sh, plus CLEANFILES).
# (See also txinfo23.sh and txinfo25.sh).
-required='makeinfo tex texi2dvi-o'
+required='makeinfo tex texi2dvi'
. ./defs || exit 1
cat >> configure.ac << 'END'
diff --git a/t/txinfo25.sh b/t/txinfo25.sh
index 4feedca19..e23f53781 100755
--- a/t/txinfo25.sh
+++ b/t/txinfo25.sh
@@ -20,7 +20,7 @@
# (Similar to txinfo16.sh, plus CLEANFILES).
# (See also txinfo23.sh and txinfo24.sh).
-required='makeinfo tex texi2dvi-o'
+required='makeinfo tex texi2dvi'
. ./defs || exit 1
cat >> configure.ac << 'END'
diff --git a/t/txinfo28.sh b/t/txinfo28.sh
index 216cb6365..f3517b64f 100755
--- a/t/txinfo28.sh
+++ b/t/txinfo28.sh
@@ -19,7 +19,7 @@
# references.
# Report from Ralf Corsepius.
-required='makeinfo tex texi2dvi-o'
+required='makeinfo tex texi2dvi'
. ./defs || exit 1
# This setting, when honored by GNU ls, used to cause an infinite loop
diff --git a/t/txinfo30.sh b/t/txinfo30.sh
deleted file mode 100755
index 8c6aa912d..000000000
--- a/t/txinfo30.sh
+++ /dev/null
@@ -1,63 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2005-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Make sure 'missing texinfo' does not create empty files.
-# Report from Bob Proulx.
-
-. ./defs || exit 1
-
-echo info_TEXINFOS = bar.texi >Makefile.am
-echo grepme >bar.info
-$sleep
-cat >bar.texi <<EOF
-@setfilename bar.info
-EOF
-
-echo AC_OUTPUT >>configure.ac
-
-cat >makeinfo <<\EOF
-#!/bin/sh
-# This script
-# 1. fails so 'missing' can take over
-# 2. does not understand '--version' so 'missing' thinks 'makeinfo' isn't
-# installed
-exec false
-EOF
-
-chmod +x makeinfo
-
-PATH=$(pwd)$PATH_SEPARATOR$PATH
-export PATH
-
-# Otherwise configure might pick up a working makeinfo from the
-# environment. Seen in automake bug#10866.
-unset MAKEINFO || :
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-./configure
-$MAKE
-grep grepme bar.info
-test -f bar.info
-
-# We should not create a missing bar.info.
-rm -f bar.info
-$MAKE && exit 1
-test ! -e bar.info
-
-:
diff --git a/t/txinfo33.sh b/t/txinfo33.sh
index efb2678e2..a55b5ed53 100755
--- a/t/txinfo33.sh
+++ b/t/txinfo33.sh
@@ -17,7 +17,7 @@
# DVIS, PDFS, PSS, HTMLS should not be cleaned upon 'mostlyclean'.
# Similar to txinfo25.sh.
-required='makeinfo tex texi2dvi-o dvips'
+required='makeinfo tex texi2dvi dvips'
. ./defs || exit 1
mkdir sub
diff --git a/t/txinfo5.sh b/t/txinfo5.sh
deleted file mode 100755
index 44a2faecd..000000000
--- a/t/txinfo5.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1998-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure that texinfo.tex is not required by --cygnus.
-# Also check that TEXINFOS + cygnus work without requiring the
-# '-Wno-override' option.
-# See also sister test txinfo5b.sh.
-# Report from Ian Taylor.
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-END
-
-cat > Makefile.am << 'END'
-info_TEXINFOS = ian.texi
-END
-
-echo '@setfilename ian.info' > ian.texi
-
-$ACLOCAL
-$AUTOMAKE --cygnus -Wno-obsolete
-
-:
diff --git a/t/txinfo5b.sh b/t/txinfo5b.sh
deleted file mode 100755
index 6c81cedac..000000000
--- a/t/txinfo5b.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1998-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure that texinfo.tex is not required by --cygnus.
-# See also sister test txinfo5.sh.
-# Report from Ian Taylor.
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-END
-
-cat > Makefile.am << 'END'
-# Disable 'override' warnings to work around an unrelated
-# texi+cygnus bug.
-# Disable obsolete warnings because the 'cygnus' mode is now deprecated.
-AUTOMAKE_OPTIONS = -Wno-override -Wno-obsolete
-info_TEXINFOS = ian.texi
-END
-
-echo '@setfilename ian.info' > ian.texi
-
-$ACLOCAL
-$AUTOMAKE --cygnus
-$AUTOMAKE -a --cygnus
-test ! -e texinfo.tex
-
-:
diff --git a/t/recurs.sh b/t/var-recurs.sh
index 0dc04d307..6071e660f 100755
--- a/t/recurs.sh
+++ b/t/var-recurs.sh
@@ -20,8 +20,6 @@
cat >> configure.ac << 'END'
AC_PROG_CC
-AM_CONDITIONAL(ONE, true)
-AM_CONDITIONAL(TWO, false)
END
cat > Makefile.am << 'END'
diff --git a/t/recurs2.sh b/t/var-recurs2.sh
index 9472631ba..0acdc2a0e 100755
--- a/t/recurs2.sh
+++ b/t/var-recurs2.sh
@@ -27,3 +27,5 @@ END
$ACLOCAL
$AUTOMAKE
+
+:
diff --git a/t/vtexi4.sh b/t/vtexi4.sh
index 3f2a89ba3..336ee8617 100755
--- a/t/vtexi4.sh
+++ b/t/vtexi4.sh
@@ -21,7 +21,7 @@
# for more vers*.texi files, and does not require makeinfo, tex and
# texi2dvi.
-required='makeinfo tex texi2dvi-o grep-nonprint'
+required='makeinfo tex texi2dvi grep-nonprint'
. ./defs || exit 1
test $(LC_ALL=C date '+%u') -gt 0 && test $(LC_ALL=C date '+%u') -lt 8 \