summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/aclocal-acdir.sh10
-rw-r--r--t/aclocal-amflags.sh15
-rw-r--r--t/aclocal-deleted-header-aclocal-amflags.sh5
-rw-r--r--t/aclocal-dirlist.sh10
-rw-r--r--t/aclocal-m4-include-are-scanned-aclocal-amflags.sh1
-rw-r--r--t/aclocal-path-precedence.sh18
-rw-r--r--t/autodist-configure-no-subdir.sh10
-rw-r--r--t/ax/distcheck-hook-m4.am2
-rw-r--r--t/backcompat6.sh3
-rw-r--r--t/compile_f_c_cxx.sh15
-rw-r--r--t/cscope.tap6
-rw-r--r--t/depcomp8a.sh21
-rw-r--r--t/depcomp8b.sh23
-rw-r--r--t/dist-missing-m4.sh5
-rw-r--r--t/dist-shar.sh14
-rw-r--r--t/dist-tarZ.sh27
-rw-r--r--t/distcheck-Tpo.sh (renamed from t/mkdir_p.sh)53
-rw-r--r--t/fort2.sh15
-rw-r--r--t/fort4.sh39
-rw-r--r--t/fort5.sh15
-rw-r--r--t/gcj.sh37
-rw-r--r--t/gettext-macros.sh3
-rw-r--r--t/help.sh7
-rw-r--r--t/includes-deprecation.sh (renamed from t/subobj4.sh)35
-rw-r--r--t/lex-line.sh32
-rw-r--r--t/libobj20b.sh2
-rw-r--r--t/libobj20c.sh2
-rw-r--r--t/libtool-macros.sh5
-rw-r--r--t/libtool3.sh14
-rw-r--r--t/list-of-tests.mk15
-rw-r--r--t/ltlibsrc.sh9
-rw-r--r--t/mdate5.sh51
-rw-r--r--t/pluseq5.sh20
-rw-r--r--t/pr401.sh11
-rw-r--r--t/pr401b.sh9
-rw-r--r--t/pr401c.sh10
-rw-r--r--t/remake-deleted-m4-file.sh5
-rw-r--r--t/remake-gnulib-add-acsubst.sh4
-rw-r--r--t/remake-gnulib-add-header.sh4
-rw-r--r--t/remake-gnulib-remove-header.sh4
-rw-r--r--t/remake-moved-m4-file.sh5
-rw-r--r--t/remake-renamed-m4-file.sh4
-rw-r--r--t/remake-renamed-m4-macro-and-file.sh4
-rw-r--r--t/remake-renamed-m4-macro.sh4
-rw-r--r--t/silent-nested-vars.sh2
-rw-r--r--t/subobj-pr13928-more-langs.sh2
-rw-r--r--t/subobj.sh32
-rw-r--r--t/subobj11a.sh10
-rw-r--r--t/subpkg-yacc.sh14
-rw-r--r--t/subpkg.sh7
-rw-r--r--t/txinfo-clean.sh1
-rw-r--r--t/txinfo-makeinfo-error-no-clobber.sh7
-rw-r--r--t/txinfo-no-extra-dist.sh62
-rw-r--r--t/warnings-obsolete-default.sh9
-rw-r--r--t/warnopts.sh42
-rw-r--r--t/werror2.sh1
-rw-r--r--t/xsource.sh18
-rw-r--r--t/yacc-grepping2.sh30
-rw-r--r--t/yacc-line.sh45
59 files changed, 387 insertions, 498 deletions
diff --git a/t/aclocal-acdir.sh b/t/aclocal-acdir.sh
index 07c624430..6d5ac9c66 100644
--- a/t/aclocal-acdir.sh
+++ b/t/aclocal-acdir.sh
@@ -15,8 +15,8 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# 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.
+# check that stuff in the system acdir takes precedence over stuff in
+# the automake acdir.
. test-init.sh
@@ -65,14 +65,14 @@ $FGREP 'my--macro' configure
rm -rf autom4te*.cache
-# Stuff in automake acdir takes precedence over stuff in system acdir.
+# Stuff in system acdir takes precedence over stuff in automake acdir.
cat > am/bar.m4 <<'END'
AC_DEFUN([MY_MACRO], [am--macro])
END
$ACLOCAL --automake-acdir am --system-acdir sys
$AUTOCONF --force
$FGREP 'fake--init--automake' configure
-$FGREP 'am--macro' configure
-$FGREP 'my--macro' configure && exit 1 # Just to be sure.
+$FGREP 'my--macro' configure
+$FGREP 'am--macro' configure && exit 1
:
diff --git a/t/aclocal-amflags.sh b/t/aclocal-amflags.sh
index ca89b21a6..2979b2043 100644
--- a/t/aclocal-amflags.sh
+++ b/t/aclocal-amflags.sh
@@ -15,8 +15,8 @@
# along with this program. If not, see <https://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.
+# Makefile.am is warned against, but still works. Remove this test
+# once support for this obsolescent idiom is removed.
. test-init.sh
@@ -45,7 +45,16 @@ $ACLOCAL -I m4_1 >output 2>&1 || { cat output; exit 1; }
cat output
grep 'found macro' output && exit 1 # Sanity check.
$AUTOCONF
-$AUTOMAKE
+
+for opts in '' '-Wnone -Wobsolete'; do
+ AUTOMAKE_fails $opts
+ grep "Makefile\.am:.*'ACLOCAL_AMFLAGS' is deprecated" stderr
+ grep "Makefile\.am:.*'AC_CONFIG_MACRO_DIRS'.*configure\.ac.*instead" stderr
+done
+
+echo AUTOMAKE_OPTIONS = -Wall -Wno-obsolete >> Makefile.am
+cat Makefile.am # For debugging.
+$AUTOMAKE -Werror
./configure
test -f foo
diff --git a/t/aclocal-deleted-header-aclocal-amflags.sh b/t/aclocal-deleted-header-aclocal-amflags.sh
index 098c9558b..c161b52ff 100644
--- a/t/aclocal-deleted-header-aclocal-amflags.sh
+++ b/t/aclocal-deleted-header-aclocal-amflags.sh
@@ -22,7 +22,10 @@
. test-init.sh
-cat >>configure.ac <<EOF
+cat > configure.ac <<EOF
+AC_INIT([$me], [1.3])
+AM_INIT_AUTOMAKE([-Wno-obsolete])
+AC_CONFIG_FILES([Makefile])
FOO
AC_OUTPUT
EOF
diff --git a/t/aclocal-dirlist.sh b/t/aclocal-dirlist.sh
index 7cea8f9fa..ec933da11 100644
--- a/t/aclocal-dirlist.sh
+++ b/t/aclocal-dirlist.sh
@@ -35,9 +35,9 @@ module=[$1]
AC_SUBST(module)])
END
-cat >dirlist-test/init.m4 <<EOF
-AC_DEFUN([AM_INIT_AUTOMAKE], [I should not be included])
-EOF
+cat >dirlist-test/init.m4 <<'END'
+AC_DEFUN([AM_INIT_AUTOMAKE], [Hey, I should be included, really!])
+END
$ACLOCAL --system-acdir acdir
$AUTOCONF
@@ -49,8 +49,6 @@ grep m4_include aclocal.m4 && exit 1
grep 'GUILE-VERSION' configure
-# This bug can occur only when we do a VPATH build of Automake
-# but it's OK because VPATH builds are done by 'make distcheck'.
-grep 'I should not be included' configure && exit 1
+$FGREP 'Hey, I should be included, really!' configure
:
diff --git a/t/aclocal-m4-include-are-scanned-aclocal-amflags.sh b/t/aclocal-m4-include-are-scanned-aclocal-amflags.sh
index 333d5d1ce..5d21090fe 100644
--- a/t/aclocal-m4-include-are-scanned-aclocal-amflags.sh
+++ b/t/aclocal-m4-include-are-scanned-aclocal-amflags.sh
@@ -46,6 +46,7 @@ echo 'AC_DEFUN([ANOTHER_MACRO])' >defs/f.m4
cat >>Makefile.am<<\EOF
ACLOCAL_AMFLAGS = -I defs
+AUTOMAKE_OPTIONS = -Wno-obsolete
testdist1: distdir
test -f $(distdir)/acinclude.m4
test -f $(distdir)/a.m4
diff --git a/t/aclocal-path-precedence.sh b/t/aclocal-path-precedence.sh
index cefdad87c..a96cd86f0 100644
--- a/t/aclocal-path-precedence.sh
+++ b/t/aclocal-path-precedence.sh
@@ -46,10 +46,16 @@ cat > mdir3/bar.m4 << 'END'
AC_DEFUN([BAR_MACRO], [::pass-bar::])
END
-cat > mdir2/quux.m4 << 'END'
-AC_DEFUN([AM_INIT_AUTOMAKE], [::fail-init::])
-AC_DEFUN([AC_PROG_LIBTOOL], [::pass-libtool::])
-AC_DEFUN([AM_GNU_GETTEXT], [::pass-gettext::])
+cat > mdir2/quux-a.m4 << 'END'
+AC_DEFUN([AM_INIT_AUTOMAKE], [::pass-am-init::])
+END
+
+cat > mdir2/quux-b.m4 << 'END'
+AC_DEFUN([AC_PROG_LIBTOOL], [::pass-libtool::])
+END
+
+cat > mdir2/quux-c.m4 << 'END'
+AC_DEFUN([AM_GNU_GETTEXT], [::pass-gettext::])
END
cat > sysdir/libtool.m4 << 'END'
@@ -81,9 +87,9 @@ $FGREP '::pass-bar::' configure
$FGREP '::pass-gettext::' configure
$FGREP '::pass-libtool::' configure
-# Directories in ACLOCAL_PATH shouldn't take precedence over the internal
+# Directories in ACLOCAL_PATH shoul take precedence over the internal
# automake acdir (typically '${prefix}/share/aclocal-${APIVERSION}').
-$FGREP 'am__api_version' configure
+$FGREP '::pass-am-init::' configure
# A final sanity check.
$FGREP '::fail' configure && exit 1
diff --git a/t/autodist-configure-no-subdir.sh b/t/autodist-configure-no-subdir.sh
index f26ad9a33..9a3860c8f 100644
--- a/t/autodist-configure-no-subdir.sh
+++ b/t/autodist-configure-no-subdir.sh
@@ -14,8 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Check that 'configure', 'configure.ac' and 'configure.in' are *not*
-# automatically distributed when placed in a subdirectory.
+# Check that 'configure' and 'configure.ac' are *not* automatically
+# distributed when placed in a subdirectory.
# Related to automake bug#7819.
. test-init.sh
@@ -32,12 +32,9 @@ sub/configure:
$(dontbuild)
sub/configure.ac:
$(dontbuild)
-sub/configure.in:
- $(dontbuild)
check-local: distdir
ls -l $(distdir)/sub
test ! -f $(distdir)/sub/configure
- test ! -f $(distdir)/sub/configure.in
test ! -f $(distdir)/sub/configure.ac
END
@@ -49,15 +46,12 @@ configure:
$(dontbuild)
configure.ac:
$(dontbuild)
-configure.in:
- $(dontbuild)
check-local:
echo $(DISTFILES) | grep 'configure' && exit 1; :
echo $(DIST_COMMON) | grep 'configure' && exit 1; :
END
: > sub/configure.ac
-: > sub/configure.in
: > sub/configure
$ACLOCAL
diff --git a/t/ax/distcheck-hook-m4.am b/t/ax/distcheck-hook-m4.am
index 9442a9896..321d3923c 100644
--- a/t/ax/distcheck-hook-m4.am
+++ b/t/ax/distcheck-hook-m4.am
@@ -15,6 +15,8 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
+AUTOMAKE_OPTIONS = -Wno-obsolete
+
distcheck-hook:
@fatal () { echo "$@: $$*" >&2; exit 1; }; \
$(am__cd) $(distdir) && chmod u+w . && mkdir _m4 \
diff --git a/t/backcompat6.sh b/t/backcompat6.sh
index 3c81a55f8..7defb4382 100644
--- a/t/backcompat6.sh
+++ b/t/backcompat6.sh
@@ -15,8 +15,7 @@
# along with this program. If not, see <https://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 autconf input file.
+# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT.
# This script can also serve as mild stress-testing for Automake.
# See also the similar test 'backcompat5.test'.
diff --git a/t/compile_f_c_cxx.sh b/t/compile_f_c_cxx.sh
index 8fa80a4b5..c0e4717b5 100644
--- a/t/compile_f_c_cxx.sh
+++ b/t/compile_f_c_cxx.sh
@@ -38,9 +38,18 @@ END
$ACLOCAL
$AUTOMAKE
+$FGREP COMPILE Makefile.in # For debugging.
+
# Look for the macros at the beginning of rules.
-$FGREP "$tab\$(AM_V_CC)\$(COMPILE)" Makefile.in
-$FGREP "$tab\$(AM_V_CXX)\$(CXXCOMPILE)" Makefile.in
-$FGREP "$tab\$(AM_V_F77)\$(F77COMPILE)" Makefile.in
+
+sed -e "s|$tab *&& *|$tab|" \
+ -e 's|$(AM_V_CC)||g' \
+ -e 's|$(AM_V_CXX)||g' \
+ -e 's|$(AM_V_F77)||g' \
+ Makefile.in >mk
+diff -u Makefile.in mk || : # For debugging.
+$FGREP "$tab\$(COMPILE)" mk
+$FGREP "$tab\$(CXXCOMPILE)" mk
+$FGREP "$tab\$(F77COMPILE)" mk
:
diff --git a/t/cscope.tap b/t/cscope.tap
index b7fbb210d..2461bcc67 100644
--- a/t/cscope.tap
+++ b/t/cscope.tap
@@ -22,10 +22,8 @@ plan_ 18
ocwd=$(pwd) || fatal_ "getting top-level directory"
-cat > configure.ac << 'END'
-AC_INIT([cscope-test], [1.0])
-AM_INIT_AUTOMAKE([subdir-objects])
-AC_CONFIG_FILES([Makefile sub/Makefile])
+cat >> configure.ac << 'END'
+AC_CONFIG_FILES([sub/Makefile])
AC_SUBST([CC], [who-cares])
AC_SUBST([CXX], [who-cares])
AC_SUBST([FC], [who-cares])
diff --git a/t/depcomp8a.sh b/t/depcomp8a.sh
index e18318061..3b2a7c545 100644
--- a/t/depcomp8a.sh
+++ b/t/depcomp8a.sh
@@ -48,26 +48,7 @@ int bar (void)
END
$ACLOCAL
-# FIXME: stop disabling the warnings in the 'unsupported' category
-# FIXME: once the 'subdir-objects' option has been mandatory.
-$AUTOMAKE -a -Wno-unsupported
-grep '\.P' Makefile.in # For debugging.
-grep '\./\$(DEPDIR)/foo\.Po' Makefile.in
-grep '\./\$(DEPDIR)/bar\.Po' Makefile.in
-grep '/\./\$(DEPDIR)' Makefile.in && exit 1
-
-$AUTOCONF
-# Don't reject slower dependency extractors, for better coverage.
-./configure --enable-dependency-tracking
-$MAKE
-cross_compiling || ./zardoz
-DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
-
-# Try again with subdir-objects option.
-
-echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
-
-$AUTOMAKE
+$AUTOMAKE -a
grep '\.P' Makefile.in # For debugging.
grep '\./\$(DEPDIR)/foo\.Po' Makefile.in
grep '[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.Po' Makefile.in
diff --git a/t/depcomp8b.sh b/t/depcomp8b.sh
index a4d5a77d6..185ae9bf6 100644
--- a/t/depcomp8b.sh
+++ b/t/depcomp8b.sh
@@ -24,16 +24,12 @@ required='cc libtoolize'
cat >> configure.ac << 'END'
AC_PROG_CC
-#x AM_PROG_CC_C_O
AM_PROG_AR
AC_PROG_LIBTOOL
AC_OUTPUT
END
cat > Makefile.am << 'END'
-## FIXME: stop disabling the warnings in the 'unsupported' category
-## FIXME: once the 'subdir-objects' option has been mandatory.
-AUTOMAKE_OPTIONS = -Wno-unsupported
lib_LTLIBRARIES = libzardoz.la
libzardoz_la_SOURCES = foo.c sub/bar.c
END
@@ -45,25 +41,8 @@ echo 'int bar (void) { return 0; }' > sub/bar.c
libtoolize
$ACLOCAL
-# FIXME: stop disabling the warnings in the 'unsupported' category
-# FIXME: once the 'subdir-objects' option has been mandatory.
-$AUTOMAKE -a -Wno-unsupported
-grep '\.P' Makefile.in # For debugging.
-grep '\./\$(DEPDIR)/foo\.Plo' Makefile.in
-grep '\./\$(DEPDIR)/bar\.Plo' Makefile.in
-grep '/\./\$(DEPDIR)' Makefile.in && exit 1
-
-$AUTOCONF
-# Don't reject slower dependency extractors, for better coverage.
-./configure --enable-dependency-tracking
-$MAKE
-DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
-
-# Try again with subdir-objects option.
-
-echo AUTOMAKE_OPTIONS += subdir-objects >> Makefile.am
+$AUTOMAKE -a
-$AUTOMAKE
grep '\.P' Makefile.in # For debugging.
grep '\./\$(DEPDIR)/foo\.Plo' Makefile.in
grep '[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.Plo' Makefile.in
diff --git a/t/dist-missing-m4.sh b/t/dist-missing-m4.sh
index a721e2789..f6ee5bde6 100644
--- a/t/dist-missing-m4.sh
+++ b/t/dist-missing-m4.sh
@@ -23,6 +23,7 @@
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
m4_pattern_forbid([^MY_])
MY_FOOBAR || exit 1
MY_ZARDOZ || exit 1
@@ -33,9 +34,9 @@ mkdir m4
echo 'AC_DEFUN([MY_FOOBAR], [:])' > m4/foobar.m4
echo 'AC_DEFUN([MY_ZARDOZ], [:])' > m4/zardoz.m4
-echo 'ACLOCAL_AMFLAGS = -I m4' > Makefile.am
+: > Makefile.am
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/dist-shar.sh b/t/dist-shar.sh
index 611480c2c..b12caa2e5 100644
--- a/t/dist-shar.sh
+++ b/t/dist-shar.sh
@@ -14,16 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Check support for no-dist-gzip with dist-shar.
+# Trying to use removed option 'dist-shar' should trigger a clear
+# error message.
required='shar unshar'
. test-init.sh
-errmsg='support for shar .*deprecated'
+errmsg='support for shar .*removed'
echo AUTOMAKE_OPTIONS = dist-shar > Makefile.am
$ACLOCAL
-AUTOMAKE_fails -Wnone -Wobsolete
+AUTOMAKE_fails -Wnone -Wno-error
grep "^Makefile\\.am:1:.*$errmsg" stderr
cat > configure.ac <<END
@@ -36,12 +37,7 @@ END
rm -rf autom4te*.cache
$ACLOCAL
-AUTOMAKE_run -Wno-error
+AUTOMAKE_fails -Wnone -Wno-error
grep "^configure\\.ac:2:.*$errmsg" stderr
-$AUTOCONF
-./configure
-$MAKE distcheck
-test -f $distdir.shar.gz
-
:
diff --git a/t/dist-tarZ.sh b/t/dist-tarZ.sh
index c4888facc..0723c9297 100644
--- a/t/dist-tarZ.sh
+++ b/t/dist-tarZ.sh
@@ -14,28 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Check support for no-dist-gzip with dist-tarZ.
+# Trying to use removed option 'dist-tarZ' should trigger a clear
+# error message.
. test-init.sh
-# On Cygwin, as of 9/2/2012, 'compress' is provided by sharutils
-# and is just a dummy script that is not able to actually compress
-# (it can only decompress). So, check that the 'compress' program
-# is actually able to compress input.
-# Note that, at least on GNU/Linux, 'compress' does (and is
-# documented to) exit with status 2 if the output is larger than
-# the input after (attempted) compression; so we need to pass it
-# an input that it can actually reduce in size when compressing.
-for x in 1 2 3 4 5 6 7 8; do
- echo aaaaaaaaaaaaaaaaaaaaa
-done | compress -c >/dev/null \
- || skip_ "cannot find a working 'compress' program"
-
-errmsg=".*legacy .*'compress' .*deprecated"
+errmsg=".*legacy .*'compress'.* removed"
echo AUTOMAKE_OPTIONS = dist-tarZ > Makefile.am
$ACLOCAL
-AUTOMAKE_fails -Wnone -Wobsolete
+AUTOMAKE_fails -Wnone -Wno-error
grep "^Makefile\\.am:1:.*$errmsg" stderr
cat > configure.ac <<END
@@ -48,12 +36,7 @@ END
rm -rf autom4te*.cache
$ACLOCAL
-AUTOMAKE_run -Wno-error
+AUTOMAKE_fails -Wnone -Wno-error
grep "^configure\\.ac:2:.*$errmsg" stderr
-$AUTOCONF
-./configure
-$MAKE distcheck
-test -f dist-tarz-1.0.tar.Z
-
:
diff --git a/t/mkdir_p.sh b/t/distcheck-Tpo.sh
index 36d91fc24..867df7809 100644
--- a/t/mkdir_p.sh
+++ b/t/distcheck-Tpo.sh
@@ -14,42 +14,45 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# AM_INIT_AUTOMAKE should still define $(mkdir_p), for backward
-# compatibility.
+# Ensure that the 'make distcheck'-run distcleancheck does not fail
+# due to a leftover .deps/base.Tpo file when part of a successful build
+# involves a failed attempt to create a .deps/base.Po file.
. test-init.sh
-cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/Makefile])
+cat >> configure.ac <<END
+AC_PROG_CC
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
+cat > foo.c <<\END
+#ifndef FAIL
+int main() { return 0; }
+#else
+int x[no_such];
+#endif
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
+cat > Makefile.am <<\END
+TESTS = foo bar.test
+check_PROGRAMS = foo
+EXTRA_DIST= bar.test foo.c
END
-$ACLOCAL
-$AUTOCONF -Werror -Wall
-$AUTOMAKE
+cat > bar.test <<END
+#!/bin/sh
+rm -f foo.o
+$MAKE AM_CFLAGS=-DFAIL foo.o && exit 1
+exit 0
+END
+chmod a+x bar.test
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
./configure
-$MAKE check-local
-$MAKE distcheck
+
+# We can build the distribution.
+run_make -M distcheck
:
diff --git a/t/fort2.sh b/t/fort2.sh
index cba91f9a8..00728d360 100644
--- a/t/fort2.sh
+++ b/t/fort2.sh
@@ -67,9 +67,18 @@ touch hello.f90 foo.f95 sub/bar.f95 hi.f03 sub/howdy.f03 greets.f08 \
sub/bonjour.f08 bye.f95 sub/baz.f90
run_make -O -- -n \
- FCFLAGS_f90=--@90 FCFLAGS_f95=--@95 FCFLAGS_f03=--@03 FCFLAGS_f08=--@08
-# To make it easier to have stricter grepping below.
-sed -e 's/[ ][ ]*/ /g' -e 's/^/ /' -e 's/$/ /' stdout > out
+ FCFLAGS_f90=--@90 FCFLAGS_f95=--@95 FCFLAGS_f03=--@03 FCFLAGS_f08=--@08 \
+# To make it easier to have stricter grepping below.
+$PERL -e '
+ undef $/;
+ $_ = <>;
+ s/[^\\]\\\n/ /g;
+ s/^/ /;
+ s/\n/ \n /g;
+ s/[ \t]+/ /g;
+ s/\n\s*\z/\n/;
+ print;
+' <stdout >out
cat out
grep ' fake-fc .* --@90 .* hello\.f90 ' out
diff --git a/t/fort4.sh b/t/fort4.sh
index c9459dfff..6f54b6466 100644
--- a/t/fort4.sh
+++ b/t/fort4.sh
@@ -34,6 +34,7 @@ END
cat >bye.f90 <<'END'
program goodbye
call baz
+ call zar
stop
end
END
@@ -46,6 +47,7 @@ END
sed s,foo,bar, foo.f90 > sub/bar.f90
sed s,foo,baz, foo.f90 > sub/baz.f
+sed s,foo,zar, foo.f90 > sub/zardoz.f90
cat >>configure.ac <<'END'
AC_PROG_F77
@@ -59,9 +61,29 @@ END
cat >Makefile.am <<'END'
bin_PROGRAMS = hello goodbye
hello_SOURCES = hello.f foo.f90 sub/bar.f90
-goodbye_SOURCES = bye.f90 sub/baz.f
+goodbye_SOURCES = bye.f90 sub/baz.f sub/zardoz.f90
goodbye_FCFLAGS =
LDADD = $(FCLIBS)
+
+.PHONY: test-obj
+test-obj:
+ ls -l . sub # For debugging.
+ test -f hello.$(OBJEXT)
+ test -f foo.$(OBJEXT)
+ test -f sub/bar.$(OBJEXT)
+ test ! -f bar.$(OBJEXT)
+ test -f goodbye-bye.$(OBJEXT)
+ test ! -f bye.$(OBJEXT)
+ test -f sub/goodbye-zardoz.$(OBJEXT)
+ test ! -f sub/zardoz.$(OBJEXT)
+ test ! -f goodbye-zardoz.$(OBJEXT)
+ test ! -f zardoz.$(OBJEXT)
+## The setting of FCFLAGS should only cause objects deriving from
+## Fortran 90, not Fortran 77, to be renamed.
+ test -f sub/baz.$(OBJEXT)
+ test ! -f sub/goodbye-baz.$(OBJEXT)
+ test ! -f goodbye-baz.$(OBJEXT)
+ test ! -f baz.$(OBJEXT)
END
$ACLOCAL
@@ -73,22 +95,9 @@ $AUTOCONF
# ./configure may exit with status 77 if no compiler is found,
# or if the compiler cannot compile Fortran 90 files).
./configure
-$MAKE
-subobjs=$(echo sub/*.o sub/*.obj)
-test "$subobjs" = 'sub/*.o sub/*.obj'
-$MAKE distcheck
-$MAKE distclean
-echo 'AUTOMAKE_OPTIONS = subdir-objects' >> Makefile.am
-$AUTOMAKE
-./configure
$MAKE
-test ! -e bar.o
-test ! -e bar.obj
-test ! -e baz.o
-test ! -e baz.obj
-test ! -e goodbye-baz.o
-test ! -e goodbye-baz.obj
+$MAKE test-obj
$MAKE distcheck
:
diff --git a/t/fort5.sh b/t/fort5.sh
index 706339dfd..5f9ab8a61 100644
--- a/t/fort5.sh
+++ b/t/fort5.sh
@@ -90,20 +90,17 @@ grep " --tag=FC" Makefile.in
# ./configure may exit with status 77 if no compiler is found,
# or if the compiler cannot compile Fortran 90 files).
./configure
-$MAKE
-subobjs=$(echo sub/*.lo)
-test "$subobjs" = 'sub/*.lo'
-$MAKE distcheck
-# The following will be fixed in a later patch:
-$MAKE distclean
-echo 'AUTOMAKE_OPTIONS = subdir-objects' >> Makefile.am
-$AUTOMAKE -a
-./configure
$MAKE
+test -f sub/bar.lo
test ! -e bar.lo
+## The setting of FCFLAGS should only cause objects deriving from
+## Fortran 90, not Fortran 77, to be renamed.
+test -f sub/baz.lo
test ! -e baz.lo
+test ! -e sub/libgoodbye_la-baz.lo
test ! -e libgoodbye_la-baz.lo
+
$MAKE distcheck
:
diff --git a/t/gcj.sh b/t/gcj.sh
index 06816f3d1..bbb287dbd 100644
--- a/t/gcj.sh
+++ b/t/gcj.sh
@@ -16,21 +16,50 @@
# Test of compiled java.
+required='gcc gcj'
. test-init.sh
cat >> configure.ac << 'END'
-_AM_DEPENDENCIES([GCJ])
-AC_SUBST([GCJ])
+# FIXME: AM_PROG_GCJ should cause OBJEXT and EXEEXT to be set, but
+# FIXME: it currently does not. See also xfailing test 'gcj6.sh'.
+AC_PROG_CC
+AM_PROG_GCJ
+AC_OUTPUT
END
cat > Makefile.am << 'END'
bin_PROGRAMS = convert
-convert_SOURCES = x/y/convert.java
+convert_SOURCES = $(my_java_source)
+convert_LDFLAGS = --main=convert
+my_java_source = x/y/convert.java
+$(my_java_source):
+ rm -f $@-t $@
+ test -d $(@D) || $(MKDIR_P) $(@D)
+ echo 'public class convert {' >> $@-t
+ echo ' public static void main (String[] args) {' >> $@-t
+ echo ' System.out.println("Hello, World!");' >> $@-t
+ echo ' }' >> $@-t
+ echo '}' >> $@-t
+ chmod a-w $@-t && mv -f $@-t $@
+.PHONY: test-obj
+check-local: test-obj
+test-obj:
+ test -f x/y/convert.$(OBJEXT)
END
$ACLOCAL
$AUTOMAKE
+$FGREP 'x/y/convert.$(OBJEXT)' Makefile.in
-grep '^x/y/convert' Makefile.in
+$AUTOCONF
+./configure
+
+$MAKE
+$MAKE test-obj
+if ! cross_compiling; then
+ ./convert
+ test "$(./convert)" = 'Hello, World!'
+fi
+$MAKE distcheck
:
diff --git a/t/gettext-macros.sh b/t/gettext-macros.sh
index edb131146..3f46945fa 100644
--- a/t/gettext-macros.sh
+++ b/t/gettext-macros.sh
@@ -29,7 +29,8 @@ echo "# Automatically generated by $me." > get.sh
echo : >> get.sh
# The 'autopoint' script will look into Makefile.am.
-echo ACLOCAL_AMFLAGS = -I m4 > Makefile.am
+echo AUTOMAKE_OPTIONS = -Wno-obsolete > Makefile.am
+echo ACLOCAL_AMFLAGS = -I m4 >> Makefile.am
# Prefer autopoint to gettextize, since the latter unconditionally
# requires user interaction to complete; yes, this means confirmation
diff --git a/t/help.sh b/t/help.sh
index 7df39d2ad..f048cd96f 100644
--- a/t/help.sh
+++ b/t/help.sh
@@ -14,8 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Make sure --help and --version work, even when no configure.ac nor
-# configure.in is in the current directory.
+# Make sure --help and --version work, even when no configure.ac is in
+# the current directory.
. test-init.sh
@@ -33,8 +33,7 @@ $ACLOCAL --help
$AUTOMAKE --version
$AUTOMAKE --help
-# Sanity checks: aclocal and automake cannot work without configure.ac
-# nor configure.in.
+# Sanity checks: aclocal and automake cannot work without configure.ac.
$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
$FGREP configure.ac stderr
diff --git a/t/subobj4.sh b/t/includes-deprecation.sh
index dd464d934..c46439710 100644
--- a/t/subobj4.sh
+++ b/t/includes-deprecation.sh
@@ -14,37 +14,30 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Make sure '../foo/foo.cpp' generates a rule.
-# Report from Dave Brolley.
+# Support for $(INCLUDES) is deprecated.
. test-init.sh
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AC_PROG_CXX
-AC_CONFIG_FILES([d1/Makefile d2/Makefile])
-AC_OUTPUT
-END
+echo AC_PROG_CC >> configure.ac
-mkdir d1 d2
+$ACLOCAL
cat > Makefile.am << 'END'
-SUBDIRS = d1 d2
-END
-
-cat > d1/Makefile.am << 'END'
-bin_PROGRAMS = z
-z_SOURCES = ../d2/z.c
+bin_PROGRAMS = foo
+INCLUDES = -DFOO
END
-cat > d2/Makefile.am << 'END'
-END
+AUTOMAKE_fails -Wnone -Wobsolete
+grep "^Makefile\\.am:2:.* 'INCLUDES'.* deprecated.* 'AM_CPPFLAGS'" stderr
+AUTOMAKE_run -Wall -Wno-obsolete
+test ! -s stderr
-: > d2/z.c
+$sleep
-$ACLOCAL
-$AUTOMAKE -Wno-unsupported
+echo 'AC_SUBST([INCLUDES])' >> configure.ac
+sed '/^INCLUDES/d' Makefile.am > t && mv -f t Makefile.am
-grep '\$(CC) .*\.\./d2/z\.c' d1/Makefile.in
+AUTOMAKE_run -Wno-error
+grep "^configure\\.ac:5:.* 'INCLUDES'.* deprecated.* 'AM_CPPFLAGS'" stderr
:
diff --git a/t/lex-line.sh b/t/lex-line.sh
index d93d0deb0..93997de4a 100644
--- a/t/lex-line.sh
+++ b/t/lex-line.sh
@@ -15,15 +15,13 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Check that automake lex support ensures that lex-generated C
-# files use correct "#line" directives. Try also with the
-# 'subdir-object' option enabled.
+# files use correct "#line" directives.
# See also sister test 'yacc-line.sh'.
required='cc lex'
. test-init.sh
cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AC_PROG_LEX
AC_OUTPUT
@@ -32,7 +30,6 @@ END
mkdir dir sub sub/dir
cat > Makefile.am << 'END'
-SUBDIRS = sub
bin_PROGRAMS = foo bar
LDADD = $(LEXLIB)
bar_LFLAGS = -v
@@ -43,19 +40,6 @@ zardoz.@OBJEXT@: zardoz.c
bar-quux.@OBJEXT@: bar-quux.c
END
-cat > sub/Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-noinst_PROGRAMS = foo bar
-## We already used $(LEXLIB) above, so try @LEXLIB@ now.
-LDADD = @LEXLIB@
-foo_LFLAGS = -v
-foo_SOURCES = zardoz.l
-bar_SOURCES = dir/quux.l
-## Avoid spurious failures with Solaris make.
-foo-zardoz.@OBJEXT@: foo-zardoz.c
-dir/quux.@OBJEXT@: dir/quux.c
-END
-
cat > zardoz.l << 'END'
%{
#define YY_NO_UNISTD_H 1
@@ -79,10 +63,8 @@ int yywrap (void)
END
cp zardoz.l dir/quux.l
-cp zardoz.l sub/zardoz.l
-cp zardoz.l sub/dir/quux.l
-c_outputs='zardoz.c bar-quux.c sub/foo-zardoz.c sub/dir/quux.c'
+c_outputs='zardoz.c dir/bar-quux.c'
$ACLOCAL
$AUTOCONF
@@ -104,7 +86,7 @@ for vpath in : false; do
$MAKE
# For debugging,
- ls -l . sub sub/dir
+ ls -l . dir
$EGREP 'line|\.l' $c_outputs
grep '#.*line.*build.*\.l' $c_outputs && exit 1
@@ -118,14 +100,10 @@ for vpath in : false; do
grep "#.*\.l.*\.l" $c_outputs && exit 1
if $vpath; then
grep '#.*line.*"\.\./zardoz\.l"' zardoz.c
- grep '#.*line.*"\.\./dir/quux\.l"' bar-quux.c
- grep '#.*line.*"\.\./\.\./sub/zardoz\.l"' sub/foo-zardoz.c
- grep '#.*line.*"\.\./\.\./sub/dir/quux\.l"' sub/dir/quux.c
+ grep '#.*line.*"\.\./dir/quux\.l"' dir/bar-quux.c
else
grep '#.*line.*"zardoz\.l"' zardoz.c
- grep '#.*line.*"dir/quux\.l"' bar-quux.c
- grep '#.*line.*"zardoz\.l"' sub/foo-zardoz.c
- grep '#.*line.*"dir/quux\.l"' sub/dir/quux.c
+ grep '#.*line.*"dir/quux\.l"' dir/bar-quux.c
fi
cd $srcdir
diff --git a/t/libobj20b.sh b/t/libobj20b.sh
index 3a466bf07..c70dfb8bf 100644
--- a/t/libobj20b.sh
+++ b/t/libobj20b.sh
@@ -15,7 +15,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
-# See also sister tests 'libobj20a.sh' and 'libobj20c.sh'.
+# See also sister test 'libobj20c.sh'.
. test-init.sh
diff --git a/t/libobj20c.sh b/t/libobj20c.sh
index b12eea618..c8200d8b9 100644
--- a/t/libobj20c.sh
+++ b/t/libobj20c.sh
@@ -15,7 +15,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
-# See also sister tests 'libobj20a.sh' and 'libobj20b.sh'.
+# See also sister test 'libobj20b.sh'.
. test-init.sh
diff --git a/t/libtool-macros.sh b/t/libtool-macros.sh
index 903a25d3f..637adb402 100644
--- a/t/libtool-macros.sh
+++ b/t/libtool-macros.sh
@@ -23,8 +23,7 @@
echo "# Automatically generated by $me." > get.sh
echo : >> get.sh
-# The 'libtoolize' script will look into Makefile.am.
-echo ACLOCAL_AMFLAGS = -I m4 > Makefile.am
+echo 'AC_CONFIG_MACRO_DIR([m4])' >> configure.ac
if libtoolize --copy --install && test -f m4/libtool.m4; then
echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
@@ -37,7 +36,7 @@ else
mkdir m4
echo AC_PROG_LIBTOOL >> configure.ac
# See below for an explanation about the use the of '-Wno-syntax'.
- if $ACLOCAL -Wno-syntax -I m4 --install && test -f m4/libtool.m4; then
+ if $ACLOCAL -Wno-syntax --install && test -f m4/libtool.m4; then
: # Libtool macros already accessible by default.
else
echo "skip_all_ \"couldn't find or get libtool macros\"" >> get.sh
diff --git a/t/libtool3.sh b/t/libtool3.sh
index 5e5fd0df3..bb783e294 100644
--- a/t/libtool3.sh
+++ b/t/libtool3.sh
@@ -28,10 +28,6 @@ AC_OUTPUT
END
cat > Makefile.am << 'END'
-# FIXME: stop disabling the warnings in the 'unsupported' category
-# FIXME: once the 'subdir-objects' option has been mandatory.
-AUTOMAKE_OPTIONS = -Wno-unsupported
-
lib_LTLIBRARIES = lib0.la liba/liba.la
lib0_la_SOURCES = 0.c
liba_liba_la_SOURCES = liba/a.c
@@ -79,12 +75,10 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing --copy
-# We need explicit rules to build 1.o and a.lo. Make sure
-# Automake did not output additional rules for 1.lo and and a.lo.
-$FGREP '1.o:' Makefile.in
-$FGREP '1.lo:' Makefile.in && exit 1
-$FGREP 'a.o:' Makefile.in && exit 1
-$FGREP 'a.lo:' Makefile.in
+# We shouldn't need explicit rules.
+grep -v '^\.c' Makefile.in \
+ | $FGREP -v '$(am__dirstamp)' \
+ | $EGREP '\.(o|obj|lo).*:' && exit 1
./configure
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index b49a3ad0f..d234aef48 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -138,6 +138,7 @@ t/amassign.sh \
t/am-config-header.sh \
t/am-prog-cc-stdc.sh \
t/am-prog-cc-c-o.sh \
+t/am-prog-mkdir-p.sh \
t/am-macro-not-found.sh \
t/amopt.sh \
t/amopts-location.sh \
@@ -326,7 +327,6 @@ t/condinc2.sh \
t/condlib.sh \
t/condman2.sh \
t/condman3.sh \
-t/configure.sh \
t/confdeps.sh \
t/conff.sh \
t/conff2.sh \
@@ -433,6 +433,7 @@ t/distcheck-override-infodir.sh \
t/distcheck-pr9579.sh \
t/distcheck-pr10470.sh \
t/distcheck-pr18286.sh \
+t/distcheck-Tpo.sh \
t/dmalloc.sh \
t/doc-parsing-buglets-colneq-subst.sh \
t/doc-parsing-buglets-tabs.sh \
@@ -519,6 +520,7 @@ t/help-silent.sh \
t/help-upc.sh \
t/hfs.sh \
t/implicit.sh \
+t/includes-deprecation.sh \
t/init.sh \
t/init2.sh \
t/dist-install-sh.sh \
@@ -620,7 +622,6 @@ t/libobj16b.sh \
t/libobj17.sh \
t/libobj18.sh \
t/libobj19.sh \
-t/libobj20a.sh \
t/libobj20b.sh \
t/libobj20c.sh \
t/library.sh \
@@ -706,8 +707,6 @@ t/missing-version-mismatch.sh \
t/missing3.sh \
t/am-missing-prog.sh \
t/missing-auxfile-stops-makefiles-creation.sh \
-t/mkdir_p.sh \
-t/mkdirp-deprecation.sh \
t/mkinstall.sh \
t/mkinst2.sh \
t/mkinst3.sh \
@@ -1012,7 +1011,6 @@ t/silent-configsite.sh \
t/silent-nested-vars.sh \
t/silent-custom.sh \
t/src-acsubst.sh \
-t/sourcefile-in-subdir.sh \
t/space.sh \
t/specflg6.sh \
t/specflg7.sh \
@@ -1049,7 +1047,6 @@ t/subdir-distclean.sh \
t/subdir-keep-going-pr12554.sh \
t/subobj.sh \
t/subobj2.sh \
-t/subobj4.sh \
t/subobj5.sh \
t/subobj6.sh \
t/subobj7.sh \
@@ -1211,6 +1208,7 @@ t/txinfo-no-clutter.sh \
t/txinfo-no-extra-dist.sh \
t/txinfo-no-installinfo.sh \
t/txinfo-no-repeated-targets.sh \
+t/txinfo-no-split.sh \
t/txinfo-other-suffixes.sh \
t/txinfo-override-infodeps.sh \
t/txinfo-override-texinfo-tex.sh \
@@ -1225,11 +1223,6 @@ t/txinfo-vtexi2.sh \
t/txinfo-vtexi3.sh \
t/txinfo-vtexi4.sh \
t/txinfo-without-info-suffix.sh \
-t/txinfo19.sh \
-t/txinfo23.sh \
-t/txinfo24.sh \
-t/txinfo25.sh \
-t/txinfo28.sh \
t/transform.sh \
t/transform2.sh \
t/transform3.sh \
diff --git a/t/ltlibsrc.sh b/t/ltlibsrc.sh
index 1ca9b71a9..225330944 100644
--- a/t/ltlibsrc.sh
+++ b/t/ltlibsrc.sh
@@ -33,12 +33,19 @@ AM_LDFLAGS = -module
pkglib_LTLIBRARIES = zoo.d/bar.la old.la
noinst_LTLIBRARIES = foo.la zoo.d/old2.la
-$(srcdir)/zoo_d_old2_la.c: $(srcdir)/old_la.c
+zoo_d_old2_la.c: $(srcdir)/old_la.c
cp $(srcdir)/old_la.c $@
AUTOMAKE_OPTIONS = -Wno-unsupported
END
+if useless_vpath_rebuild; then
+ unindent >> Makefile.am <<'END'
+ # Work around a known FreeBSD make issues in VPATH builds.
+ DISTCLEANFILES = zoo_d_old2_la.c
+END
+fi
+
cat > foo.c << 'END'
int foo (void)
{
diff --git a/t/mdate5.sh b/t/mdate5.sh
index 9426e53eb..cabcee339 100644
--- a/t/mdate5.sh
+++ b/t/mdate5.sh
@@ -21,25 +21,36 @@ am_create_testdir=empty
get_shell_script mdate-sh
-set x $(./mdate-sh mdate-sh)
-shift
-echo "$*" # For debugging.
-
-# Check that mdate output looks like a date:
-test $# = 3
-case $1$3 in *[!0-9]*) exit 1;; esac
-test $1 -lt 32
-# Hopefully automake will be obsolete in 80 years ;-)
-case $3 in 20[0-9][0-9]) :;; *) exit 1;; esac
-case $2 in
- January|February|March|April|May|June|July|August) ;;
- September|October|November|December) ;;
- *) exit 1
-esac
-
-# Stricter checks on the year required a POSIX date(1) command.
-if year=$(date +%Y) && test $year -gt 2010; then
- test $year = $3 || exit 1
-fi
+year=$(date +%Y) && test $year -gt 2010 || year=NONE
+
+do_checks ()
+{
+ set x $(./mdate-sh mdate-sh)
+ shift
+ echo "$*" # For debugging.
+
+ # Check that mdate output looks like a date.
+ test $# = 3 || exit 1
+ case $1$3 in *[!0-9]*) exit 1;; esac
+ test $1 -lt 32 || exit 1
+ # Hopefully automake will be obsolete in 80 years ;-)
+ case $3 in 20[0-9][0-9]) :;; *) exit 1;; esac
+ case $2 in
+ January|February|March|April|May|June|July|August) ;;
+ September|October|November|December) ;;
+ *) exit 1
+ esac
+
+ # Stricter checks on the year require a POSIX date(1) command.
+ test $year = NONE || test $year = $3 || exit 1
+}
+
+TIME_STYLE=; unset TIME_STYLE
+do_checks
+
+# This setting, when honored by GNU ls, used to cause an infinite
+# loop in mdate-sh.
+TIME_STYLE="+%Y-%m-%d %H:%M:%S"; export TIME_STYLE
+do_checks
:
diff --git a/t/pluseq5.sh b/t/pluseq5.sh
index 8c4d7ceac..145287540 100644
--- a/t/pluseq5.sh
+++ b/t/pluseq5.sh
@@ -24,9 +24,9 @@ END
cat > Makefile.am << 'END'
if CHECK
-INCLUDES = abc
+AM_CPPFLAGS = abc
endif
-INCLUDES += def
+AM_CPPFLAGS += def
END
$ACLOCAL
@@ -34,10 +34,10 @@ AUTOMAKE_fails
# We expect the following diagnostic:
#
-# Makefile.am:4: cannot apply '+=' because 'INCLUDES' is not defined in
+# Makefile.am:4: cannot apply '+=' because 'AM_CPPFLAGS' is not defined in
# Makefile.am:4: the following conditions:
# Makefile.am:4: !CHECK
-# Makefile.am:4: either define 'INCLUDES' in these conditions, or use
+# Makefile.am:4: either define 'AM_CPPFLAGS' in these conditions, or use
# Makefile.am:4: '+=' in the same conditions as the definitions.
# Is !CHECK mentioned?
@@ -45,16 +45,4 @@ grep ':.*!CHECK$' stderr
# Is there only one missing condition?
test $(grep -c ': ' stderr) -eq 1
-# By the way, Automake should suggest using AM_CPPFLAGS,
-# because INCLUDES is an obsolete name.
-grep AM_CPPFLAGS stderr
-
-# A way to suppress the obsolete warning is to use
-# -Wno-obsolete:
-echo 'AUTOMAKE_OPTIONS = -Wno-obsolete' >> Makefile.am
-AUTOMAKE_fails
-grep AM_CPPFLAGS stderr && exit 1
-# !CHECK should still be mentioned.
-grep ':.*!CHECK$' stderr
-
:
diff --git a/t/pr401.sh b/t/pr401.sh
index b0c45cad8..77c240120 100644
--- a/t/pr401.sh
+++ b/t/pr401.sh
@@ -103,17 +103,6 @@ test ! -e lib/lib
$MAKE distcheck
## -------------------------------------------- ##
-## Error message with usage in wrong directory. ##
-## -------------------------------------------- ##
-
-mv -f src/Makefile.am src/t
-sed 's/LDADD = .*/LDADD = @LIBOBJS@/' src/t > src/Makefile.am
-AUTOMAKE_fails
-grep 'cannot be used outside.*lib' stderr
-mv -f src/t src/Makefile.am
-
-
-## -------------------------------------------- ##
## Test using LIBOBJS from a sibling directory. ##
## -------------------------------------------- ##
diff --git a/t/pr401b.sh b/t/pr401b.sh
index f6a7fa2b2..4dc3df650 100644
--- a/t/pr401b.sh
+++ b/t/pr401b.sh
@@ -103,15 +103,6 @@ $AUTOMAKE -a
test ! -e lib/lib
$MAKE distcheck
-## -------------------------------------------- ##
-## Error message with usage in wrong directory. ##
-## -------------------------------------------- ##
-
-mv -f src/Makefile.am src/t
-sed 's/LDADD = .*/LDADD = @LTLIBOBJS@/' src/t > src/Makefile.am
-AUTOMAKE_fails
-grep 'cannot be used outside.*lib' stderr
-mv -f src/t src/Makefile.am
## ---------------------------------------------- ##
## Test using LTLIBOBJS from a sibling directory. ##
diff --git a/t/pr401c.sh b/t/pr401c.sh
index e1cea4ee6..e6369a4b5 100644
--- a/t/pr401c.sh
+++ b/t/pr401c.sh
@@ -104,16 +104,6 @@ $AUTOMAKE
test ! -e lib/lib
$MAKE distcheck
-## -------------------------------------------- ##
-## Error message with usage in wrong directory. ##
-## -------------------------------------------- ##
-
-mv -f src/Makefile.am src/t
-sed 's/LDADD = .*/LDADD = @ALLOCA@/' src/t > src/Makefile.am
-AUTOMAKE_fails
-grep 'cannot be used outside.*lib' stderr
-mv -f src/t src/Makefile.am
-
## ------------------------------------------- ##
## Test using ALLOCA from a sibling directory. ##
diff --git a/t/remake-deleted-m4-file.sh b/t/remake-deleted-m4-file.sh
index ad9750f9b..b7d3bc256 100644
--- a/t/remake-deleted-m4-file.sh
+++ b/t/remake-deleted-m4-file.sh
@@ -25,10 +25,11 @@
cat >> configure.ac <<'END'
FOO_MACRO
AC_OUTPUT
+dnl Deliberately put this late, for better coverage.
+AC_CONFIG_MACRO_DIR([m4])
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
.PHONY: test
test:
test '$(the_answer)' -eq 42
@@ -46,7 +47,7 @@ cat > m4/bar.m4 <<END
AC_DEFUN([BAR_MACRO], [$macro_value])
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/remake-gnulib-add-acsubst.sh b/t/remake-gnulib-add-acsubst.sh
index 3f37f06f8..f23fd719d 100644
--- a/t/remake-gnulib-add-acsubst.sh
+++ b/t/remake-gnulib-add-acsubst.sh
@@ -26,12 +26,12 @@ required=cc
cat >> configure.ac <<'END'
AC_PROG_CC
+AC_CONFIG_MACRO_DIRS([m4])
MY_MACROS
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
noinst_PROGRAMS = foo
foo_SOURCES = foo.c
BUILT_SOURCES = foo.h
@@ -70,7 +70,7 @@ int main (void) { return 0; }
typedef int checkfoo[1 - 2 * (foo != 42)];
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/remake-gnulib-add-header.sh b/t/remake-gnulib-add-header.sh
index 8f00063fb..b1c2cd30e 100644
--- a/t/remake-gnulib-add-header.sh
+++ b/t/remake-gnulib-add-header.sh
@@ -25,6 +25,7 @@ required=cc
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([.])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CC
MY_MACROS
@@ -32,7 +33,6 @@ AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I .
noinst_PROGRAMS = foo
foo_SOURCES = foo.c
BUILT_SOURCES = $(STDIO_H)
@@ -80,7 +80,7 @@ FILE *f;
int main () { return 0; }
END
-$ACLOCAL -I .
+$ACLOCAL
$AUTOHEADER
$AUTOMAKE
$AUTOCONF
diff --git a/t/remake-gnulib-remove-header.sh b/t/remake-gnulib-remove-header.sh
index ba1ade78f..3eae42954 100644
--- a/t/remake-gnulib-remove-header.sh
+++ b/t/remake-gnulib-remove-header.sh
@@ -26,6 +26,7 @@ required=cc
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([.])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CC
MY_MACROS
@@ -33,7 +34,6 @@ AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I .
noinst_PROGRAMS = foo
foo_SOURCES = foo.c
BUILT_SOURCES = $(STDIO_H)
@@ -79,7 +79,7 @@ FILE *f;
int main () { return 0; }
END
-$ACLOCAL -I .
+$ACLOCAL
$AUTOHEADER
$AUTOMAKE
$AUTOCONF
diff --git a/t/remake-moved-m4-file.sh b/t/remake-moved-m4-file.sh
index 98e17d5eb..2f3bce4e7 100644
--- a/t/remake-moved-m4-file.sh
+++ b/t/remake-moved-m4-file.sh
@@ -21,11 +21,12 @@
cat >> configure.ac <<'END'
MY_MACRO
+AC_CONFIG_MACRO_DIRS([d1])
+AC_CONFIG_MACRO_DIRS([d2 d3])
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I d1 -I d2 -I d3
.PHONY: test
test:
test '$(the_answer)' -eq 42
@@ -41,7 +42,7 @@ cat > d1/foo.m4 <<'END'
AC_DEFUN([FOO], [the_answer=42; AC_SUBST([the_answer])])
END
-$ACLOCAL -I d1
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/remake-renamed-m4-file.sh b/t/remake-renamed-m4-file.sh
index 57e199488..616de2fba 100644
--- a/t/remake-renamed-m4-file.sh
+++ b/t/remake-renamed-m4-file.sh
@@ -19,12 +19,12 @@
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
MY_MACRO
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
.PHONY: test
test:
test '$(the_answer)' -eq 42
@@ -40,7 +40,7 @@ cat > m4/foo.m4 <<'END'
AC_DEFUN([FOO], [the_answer=42; AC_SUBST([the_answer])])
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/remake-renamed-m4-macro-and-file.sh b/t/remake-renamed-m4-macro-and-file.sh
index 72adcc640..c839e4c4c 100644
--- a/t/remake-renamed-m4-macro-and-file.sh
+++ b/t/remake-renamed-m4-macro-and-file.sh
@@ -21,12 +21,12 @@
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
MY_MACRO
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
.PHONY: test
test:
test '$(the_answer)' -eq 42
@@ -42,7 +42,7 @@ cat > m4/foo.m4 <<'END'
AC_DEFUN([FOO_MACRO], [the_answer=42; AC_SUBST([the_answer])])
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/remake-renamed-m4-macro.sh b/t/remake-renamed-m4-macro.sh
index 4bd9edb5d..cb8462f7b 100644
--- a/t/remake-renamed-m4-macro.sh
+++ b/t/remake-renamed-m4-macro.sh
@@ -20,12 +20,12 @@
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
MY_MACRO
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
.PHONY: test
test:
test '$(the_answer)' -eq 42
@@ -42,7 +42,7 @@ AC_DEFUN([FOO_1], [the_answer=42
AC_SUBST([the_answer])])
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/silent-nested-vars.sh b/t/silent-nested-vars.sh
index c62a15c41..966ea9ab0 100644
--- a/t/silent-nested-vars.sh
+++ b/t/silent-nested-vars.sh
@@ -67,7 +67,7 @@ case $1 in
done ;;
esac
-nested_var_pat='^[^#].*\$([^)]*\$'
+nested_var_pat='^[^#].*[^$]\$([^)]*\$'
if
case $makefile in
-) printf '%s\n' "$makerules" | grep "$nested_var_pat";;
diff --git a/t/subobj-pr13928-more-langs.sh b/t/subobj-pr13928-more-langs.sh
index 15bdd4ebe..0095f761e 100644
--- a/t/subobj-pr13928-more-langs.sh
+++ b/t/subobj-pr13928-more-langs.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 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
diff --git a/t/subobj.sh b/t/subobj.sh
index c5bc546ee..91349d72b 100644
--- a/t/subobj.sh
+++ b/t/subobj.sh
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Test of subdir objects with C and C++.
+# Grepping checks on subdir objects with C and C++.
. test-init.sh
@@ -42,36 +42,6 @@ dream_SOURCES = generic/b.c more/r.y
bin_PROGRAMS = dream
END
-AUTOMAKE_fails
-grep "^Makefile\.am:3:.*'generic/a\.c'.* in a subdirectory" stderr
-grep "^Makefile\.am:[34]:.*'another/z\.cxx'.* in a subdirectory" stderr
-grep "^sub/Makefile\.am:1:.*'generic/b\.c'.* in a subdirectory" stderr
-grep "option 'subdir-objects' is disabled" stderr
-# Verbose tips should be given, but not too many times.
-for msg in \
- "possible forward-incompatibility" \
- "advi[sc]e.* 'subdir-objects' option throughout" \
- "unconditionally.* object file.* same subdirectory" \
-; do
- test $(grep -c "$msg" stderr) -eq 1
-done
-
-# Guard against stupid typos.
-grep 'subdir-object([^s]|$)' stderr && exit 1
-
-$AUTOMAKE -Wno-unsupported
-
-echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
-AUTOMAKE_fails
-grep "^Makefile\.am" stderr && exit 1
-grep "^sub/Makefile\.am:.*'generic/b\.c'.* in a subdirectory" stderr
-grep "option 'subdir-objects' is disabled" stderr
-
-sed 's/^AM_INIT_AUTOMAKE/&([subdir-objects])/' configure.ac > configure.tmp
-mv -f configure.tmp configure.ac
-$ACLOCAL --force
-$AUTOMAKE
-
rm -f compile
$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
diff --git a/t/subobj11a.sh b/t/subobj11a.sh
index 6b8f2d983..06a0c14e9 100644
--- a/t/subobj11a.sh
+++ b/t/subobj11a.sh
@@ -56,14 +56,8 @@ $AUTOMAKE -a
./configure --enable-dependency-tracking
-depdir=$(sed -n 's/^ *DEPDIR *= *//p' Makefile)
-if test x"$depdir" != x; then
- depdir=src/$depdir
-else
- echo "$me: cannot extract value of DEPDIR from Makefile" >&2
- exit 1
-fi
-
+$MAKE
+depdir=src/.deps
ls -l "$depdir"
test -f "$depdir"/foo.Po
diff --git a/t/subpkg-yacc.sh b/t/subpkg-yacc.sh
index 485337264..3997175ab 100644
--- a/t/subpkg-yacc.sh
+++ b/t/subpkg-yacc.sh
@@ -20,13 +20,17 @@
required='cc yacc'
. test-init.sh
-cat >>configure.ac <<'END'
+cat > configure.ac <<'END'
+AC_INIT([suya], [0.5a], [automake-bug@gnu.org])
+AM_INIT_AUTOMAKE([foreign -Wall])
AC_PROG_CC
+AC_CONFIG_FILES([Makefile])
AC_CONFIG_SUBDIRS([lib])
AC_OUTPUT
END
cat >Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = -Wno-override
SUBDIRS = lib
bin_PROGRAMS = MU
MU_LDADD = lib/liblib.a
@@ -106,14 +110,18 @@ EOF
$ACLOCAL
$AUTOCONF
-$AUTOMAKE -Wno-override
+$AUTOMAKE
+test ! -e ylwrap
+test ! -e ar-lib
cd lib
$ACLOCAL
$AUTOCONF
$AUTOHEADER
-$AUTOMAKE -Wno-override --add-missing
+$AUTOMAKE --add-missing
cd ..
+test -f ylwrap
+test -f ar-lib
./configure
diff --git a/t/subpkg.sh b/t/subpkg.sh
index d6351b100..6ffee36c4 100644
--- a/t/subpkg.sh
+++ b/t/subpkg.sh
@@ -23,7 +23,7 @@ mkdir m4
cat >m4/foo.m4 <<'EOF'
AC_DEFUN([FOO],[
- AC_PROG_CC
+ AC_REQUIRE([AC_PROG_CC])
AC_OUTPUT
])
EOF
@@ -102,7 +102,10 @@ $AUTOHEADER
$AUTOMAKE -Wno-override --add-missing
cd ..
-./configure
+./configure >stdout || { cat stdout; exit 1; }
+cat stdout
+$FGREP "checking whether $CC understands -c and -o together" stdout
+
$MAKE
$MAKE distcheck
test ! -e subpack-1 # Make sure distcheck cleans up after itself.
diff --git a/t/txinfo-clean.sh b/t/txinfo-clean.sh
index 9c1a23098..fe645224b 100644
--- a/t/txinfo-clean.sh
+++ b/t/txinfo-clean.sh
@@ -15,7 +15,6 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# DVIS, PDFS, PSS, HTMLS should not be cleaned upon 'mostlyclean'.
-# Similar to txinfo25.sh.
required='makeinfo tex texi2dvi dvips'
. test-init.sh
diff --git a/t/txinfo-makeinfo-error-no-clobber.sh b/t/txinfo-makeinfo-error-no-clobber.sh
index b8d966dab..8b225e904 100644
--- a/t/txinfo-makeinfo-error-no-clobber.sh
+++ b/t/txinfo-makeinfo-error-no-clobber.sh
@@ -45,10 +45,6 @@ $AUTOCONF
./configure
$MAKE
-# Feign more info files.
-: > main.info-1
-: > sub/main.info-1
-
# Break main.texi.
$sleep
cp main.texi main.old
@@ -64,15 +60,12 @@ END
# makeinfo will bail out, but we should conserve the old info files.
$MAKE && exit 1
test -f main.info
-test -f main.info-1
# Restore main.texi, and break sub/main.texi.
cp main.texi sub/main.texi
mv main.old main.texi
$MAKE && exit 1
test -f main.info
-test ! -e main.info-1
test -f sub/main.info
-test -f sub/main.info-1
:
diff --git a/t/txinfo-no-extra-dist.sh b/t/txinfo-no-extra-dist.sh
index 2e89cfb4a..3844d7d86 100644
--- a/t/txinfo-no-extra-dist.sh
+++ b/t/txinfo-no-extra-dist.sh
@@ -15,7 +15,10 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Test to ensure that a ".info~" or ".info.bak" file doesn't end up
-# in the distribution. Bug report from Greg McGary.
+# in the distribution or the installation. Bug report from Greg McGary.
+# Also make sure that "split" info files (today no longer supported,
+# see automake bug#13351) are not distributed nor installed. See
+# automake bug#12320.
. test-init.sh
@@ -25,14 +28,33 @@ END
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi subdir/main.texi
-test: distdir
+
+test-dist: distdir
+ test -f $(distdir)/textutils.info
+ test -f $(distdir)/subdir/main.info
@echo DISTFILES = $(DISTFILES)
- @case '$(DISTFILES)' in *'~'*|*'.bak'*) exit 1;; *) exit 0;; esac
- st=0; \
+ @case '$(DISTFILES)' in \
+ *'~'*|*'.bak'*|*'.info-'*|*.i[0-9]*) exit 1;; \
+ *) exit 0;; \
+ esac
+ @st=0; \
find $(distdir) | grep '~' && st=1; \
find $(distdir) | grep '\.bak' && st=1; \
+ find $(distdir) | grep '\.info-' && st=1; \
+ find $(distdir) | grep '\.i[0-9]' && st=1; \
+ exit $$st
+
+test-inst: install
+ test -f '$(infodir)/textutils.info'
+ test -f '$(infodir)/main.info'
+ @st=0; \
+ find '$(prefix)' | grep '~' && st=1; \
+ find '$(prefix)' | grep '\.bak' && st=1; \
+ find '$(prefix)' | grep '\.info-' && st=1; \
+ find '$(prefix)' | grep '\.i[0-9]' && st=1; \
exit $$st
-PHONY: test
+
+PHONY: test-dist test-inst
END
: > texinfo.tex
@@ -44,16 +66,26 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE
-./configure
-: > textutils.info
-: > subdir/main.info
-: > textutils.info~
-: > textutils.info.bak
-: > subdir/main.info~
-: > subdir/main.info.bak
-$MAKE test
+./configure --prefix="$(pwd)/_inst"
+info_suffixes='info info-0 info-1 info-2 i00 i01 i23 info.bak info~'
+for suf in $info_suffixes; do
+ for base in textutils subdir/main; do
+ : > $base.$suf
+ done
+done
+ls -l . subdir # For debugging.
+$MAKE test-dist
+$MAKE test-inst
$MAKE maintainer-clean
-test -f subdir/main.info~
-test -f subdir/main.info.bak
+
+for suf in $info_suffixes; do
+ for base in textutils subdir/main; do
+ if test "$suf" = info; then
+ test ! -e $base.$suf
+ else
+ test -f $base.$suf
+ fi
+ done
+done
:
diff --git a/t/warnings-obsolete-default.sh b/t/warnings-obsolete-default.sh
index e95dd6b6e..82bdb166d 100644
--- a/t/warnings-obsolete-default.sh
+++ b/t/warnings-obsolete-default.sh
@@ -22,16 +22,11 @@
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
-echo AC_PROG_CC >> configure.ac
-
-cat > Makefile.am <<'END'
-bin_PROGRAMS = foo
-INCLUDES = -Ibar
-END
+echo ACLOCAL_AMFLAGS = > Makefile.am
$ACLOCAL
AUTOMAKE_fails
-grep '^Makefile\.am:2:.*INCLUDES.*AM_CPPFLAGS' stderr
+grep '^Makefile\.am:1:.*ACLOCAL_AMFLAGS.*deprecated' stderr
# Check that we can override warnings about obsolete stuff.
$AUTOMAKE -Wno-obsolete
diff --git a/t/warnopts.sh b/t/warnopts.sh
index 003e44ef6..d964d50a8 100644
--- a/t/warnopts.sh
+++ b/t/warnopts.sh
@@ -20,6 +20,7 @@
cat >>configure.ac <<END
AC_CONFIG_FILES([sub/Makefile])
+AM_CONDITIONAL([COND_FALSE], [false])
AC_OUTPUT
END
@@ -28,47 +29,42 @@ mkdir sub
# These two Makefile contain the same errors, but have different
# warnings disabled.
-cat >Makefile.am <<END
-AUTOMAKE_OPTIONS = -Wno-obsolete
-INCLUDES = -Ifoo
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = -Wno-unsupported
+if COND_FALSE
+AUTOMAKE_OPTIONS += no-dependencies
+endif
foo_SOURCES = unused
SUBDIRS = sub
END
-cat >sub/Makefile.am <<END
+cat > sub/Makefile.am << 'END'
AUTOMAKE_OPTIONS = -Wno-syntax
-INCLUDES = -Ifoo
+if COND_FALSE
+AUTOMAKE_OPTIONS += no-dependencies
+endif
foo_SOURCES = unused
END
$ACLOCAL
AUTOMAKE_fails
# The expected diagnostic is
-# Makefile.am:3: warning: variable 'foo_SOURCES' is defined but no program or
-# library has 'foo' as canonical name (possible typo)
-# sub/Makefile.am:2: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS'
+# automake: warnings are treated as errors
+# Makefile.am:5: warning: variable 'foo_SOURCES' is defined but no program or
+# Makefile.am:5: library has 'foo' as canonical name (possible typo)
+# sub/Makefile.am:1: warning: 'AUTOMAKE_OPTIONS' cannot have conditional contents
grep '^Makefile.am:.*foo_SOURCES' stderr
-grep '^sub/Makefile.am:.*INCLUDES' stderr
+grep '^sub/Makefile.am:.*AUTOMAKE_OPTIONS' stderr
grep '^sub/Makefile.am:.*foo_SOURCES' stderr && exit 1
-grep '^Makefile.am:.*INCLUDES' stderr && exit 1
+grep '^Makefile.am:.*AUTOMAKE_OPTIONS' stderr && exit 1
# Only three lines of warnings.
-test $(grep -v 'warnings are treated as errors' stderr | wc -l) -eq 3
+test $(grep -v 'warnings are treated as errors' stderr | wc -l) = 3
-# On fast machines the autom4te.cache created during the above run of
-# $AUTOMAKE is likely to have the same time stamp as the configure.ac
-# created below; thus causing traces for the old configure.ac to be
-# used. We could do '$sleep', but it's faster to erase the
-# directory. (Erase autom4te*.cache, not autom4te.cache, because some
-# bogus installations of Autoconf use a versioned cache).
rm -rf autom4te*.cache
# If we add a global -Wnone, all warnings should disappear.
-cat >configure.ac <<END
-AC_INIT([warnopts], [1.0])
-AM_INIT_AUTOMAKE([-Wnone])
-AC_CONFIG_FILES([Makefile sub/Makefile])
-AC_OUTPUT
-END
+sed 's/^AM_INIT_AUTOMAKE/AM_INIT_AUTOMAKE([-Wnone])/' configure.ac > t
+mv -f t configure.ac
$ACLOCAL
$AUTOMAKE
diff --git a/t/werror2.sh b/t/werror2.sh
index 2605f3c4e..ea638d771 100644
--- a/t/werror2.sh
+++ b/t/werror2.sh
@@ -37,7 +37,6 @@ $MAKE
cat >Makefile.am <<END
AUTOMAKE_OPTIONS = -Werror
-INCLUDES = -Ifoo
foo_SOURCES = unused
END
diff --git a/t/xsource.sh b/t/xsource.sh
index b0b503440..69af901d6 100644
--- a/t/xsource.sh
+++ b/t/xsource.sh
@@ -21,18 +21,22 @@
cat > Makefile.am << 'END'
bin_PROGRAMS = zardoz
-zardoz_SOURCES = z.c x/z.c
+lib_LTLIBRARIES = libfoo.la
+zardoz_SOURCES = z.c
+libfoo_la_SOURCES = z.c
END
+: > ltmain.sh
+: > config.guess
+: > config.sub
+
cat >> configure.ac << 'END'
AC_PROG_CC
+AC_SUBST([LIBTOOL], [unused])
END
-mkdir x
-
-: > z.c
-: > x/z.c
-
$ACLOCAL
AUTOMAKE_fails
-$FGREP 'z.$(OBJEXT)' stderr
+$FGREP "object 'z.\$(OBJEXT)' created both with libtool and without" stderr
+
+:
diff --git a/t/yacc-grepping2.sh b/t/yacc-grepping2.sh
index 71be64dbe..f86c49916 100644
--- a/t/yacc-grepping2.sh
+++ b/t/yacc-grepping2.sh
@@ -24,57 +24,33 @@ AC_PROG_CC
AC_PROG_YACC
END
-cat > Makefile.am << 'END'
-bin_PROGRAMS = maude
-maude_SOURCES = sub/maude.y
-END
-
-mkdir sub
-
-: > sub/maude.y
-
$ACLOCAL
-# FIXME: stop disabling the warnings in the 'unsupported' category
-# FIXME: once the 'subdir-objects' option has been mandatory.
-$AUTOMAKE -a -Wno-unsupported
-
-grep '^maude\.c:.*maude\.y' Makefile.in
-
-
-## Try again with subdir-objects.
cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = maude
maude_SOURCES = sub/maude.y
END
$AUTOMAKE -a
-
# No rule needed, the default .y.c: inference rule is enough
# (but there may be an additional dependency on a dirstamp file).
grep '^sub/maude\.c:.*maude\.y' Makefile.in && exit 1
-
## Try again with per-exe flags.
cat > Makefile.am << 'END'
bin_PROGRAMS = maude
maude_SOURCES = sub/maude.y
-## A particularly trickey case.
+## A particularly tricky case.
maude_YFLAGS = -d
END
-# FIXME: stop disabling the warnings in the 'unsupported' category
-# FIXME: once the 'subdir-objects' option has been mandatory.
-$AUTOMAKE -a -Wno-unsupported
-
+$AUTOMAKE -a
+grep '^sub/maude-maude\.c:.*sub/maude\.y' Makefile.in
# Rule should use maude_YFLAGS.
grep 'AM_YFLAGS.*maude' Makefile.in && exit 1
-
# Silly regression.
grep 'maudec' Makefile.in && exit 1
-
# Make sure the .o file is required.
grep '^am_maude_OBJECTS.*maude' Makefile.in
diff --git a/t/yacc-line.sh b/t/yacc-line.sh
index 6bf349f17..326ff8a96 100644
--- a/t/yacc-line.sh
+++ b/t/yacc-line.sh
@@ -15,43 +15,26 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Check that automake yacc support ensures that yacc-generated C
-# files use correct "#line" directives. Try also with the
-# 'subdir-object' option enabled.
-# See also sister test 'lex-line.sh'.
+# files use correct "#line" directives.
+# See also sister test 'lex-line.test'.
required='cc yacc'
. test-init.sh
cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AC_PROG_YACC
AC_OUTPUT
END
-mkdir dir sub sub/dir
+mkdir dir
cat > Makefile.am << 'END'
-SUBDIRS = sub
-bin_PROGRAMS = foo bar
-AM_YFLAGS = -d
-bar_YFLAGS =
+noinst_PROGRAMS = foo bar baz
+baz_YFLAGS = -d
foo_SOURCES = zardoz.y
bar_SOURCES = dir/quux.y
-## Avoid spurious failures with Solaris make.
-zardoz.@OBJEXT@: zardoz.c
-bar-quux.@OBJEXT@: bar-quux.c
-END
-
-cat > sub/Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-noinst_PROGRAMS = foo bar
-foo_YFLAGS = -d
-foo_SOURCES = zardoz.y
-bar_SOURCES = dir/quux.y
-## Avoid spurious failures with Solaris make.
-foo-zardoz.@OBJEXT@: foo-zardoz.c
-dir/quux.@OBJEXT@: dir/quux.c
+baz_SOURCES = zardoz.y
END
cat > zardoz.y << 'END'
@@ -69,10 +52,8 @@ int main(void)
END
cp zardoz.y dir/quux.y
-cp zardoz.y sub/zardoz.y
-cp zardoz.y sub/dir/quux.y
-c_outputs='zardoz.c bar-quux.c sub/foo-zardoz.c sub/dir/quux.c'
+c_outputs='zardoz.c dir/quux.c baz-zardoz.c'
$ACLOCAL
$AUTOCONF
@@ -94,7 +75,7 @@ for vpath in : false; do
$MAKE
# For debugging,
- ls -l . sub sub/dir
+ ls -l . dir
$EGREP 'line|\.y' $c_outputs
# Adjusted "#line" should not contain reference to the builddir.
@@ -109,14 +90,12 @@ for vpath in : false; do
grep "#.*\.y.*\.y" $c_outputs && exit 1
if $vpath; then
grep '#.*line.*"\.\./zardoz\.y"' zardoz.c
- grep '#.*line.*"\.\./dir/quux\.y"' bar-quux.c
- grep '#.*line.*"\.\./\.\./sub/zardoz\.y"' sub/foo-zardoz.c
- grep '#.*line.*"\.\./\.\./sub/dir/quux\.y"' sub/dir/quux.c
+ grep '#.*line.*"\.\./zardoz\.y"' baz-zardoz.c
+ grep '#.*line.*"\.\./dir/quux\.y"' dir/quux.c
else
grep '#.*line.*"zardoz\.y"' zardoz.c
- grep '#.*line.*"dir/quux\.y"' bar-quux.c
- grep '#.*line.*"zardoz\.y"' sub/foo-zardoz.c
- grep '#.*line.*"dir/quux\.y"' sub/dir/quux.c
+ grep '#.*line.*"zardoz\.y"' baz-zardoz.c
+ grep '#.*line.*"dir/quux\.y"' dir/quux.c
fi
cd $srcdir