summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PLANS/obsolete-removed/am-prog-mkdir-p.txt72
-rw-r--r--PLANS/subdir-objects.txt37
-rw-r--r--PLANS/texi/warnings-for-automake-ng-compatibility.txt4
-rw-r--r--automake.in3
-rw-r--r--doc/automake-ng.texi35
-rwxr-xr-xlib/ylwrap26
-rw-r--r--m4/init.m45
-rw-r--r--m4/obsolete-err.m418
-rw-r--r--maintainer/syntax-checks.mk4
-rwxr-xr-xt/am-prog-mkdir-p-no-more.sh44
-rwxr-xr-xt/am-prog-mkdir-p.sh (renamed from t/mkdir_p.sh)33
-rw-r--r--t/ax/depcomp.sh2
-rwxr-xr-xt/cscope.tap6
-rwxr-xr-xt/depcomp8a.sh4
-rwxr-xr-xt/depcomp8b.sh3
-rwxr-xr-xt/ext2.sh1
-rwxr-xr-xt/extra-portability.sh2
-rwxr-xr-xt/fort2.sh4
-rwxr-xr-xt/fort4.sh2
-rwxr-xr-xt/fort5.sh4
-rwxr-xr-xt/gettext-macros.sh13
-rwxr-xr-xt/lex-line.sh4
-rwxr-xr-xt/lex-multiple.sh107
-rwxr-xr-xt/libtool3.sh4
-rwxr-xr-xt/ltinstloc.sh1
-rwxr-xr-xt/ltorder.sh1
-rwxr-xr-xt/parallel-tests-suffix-prog.sh1
-rwxr-xr-xt/specflg9.sh1
-rwxr-xr-xt/subobj7.sh1
-rwxr-xr-xt/subpkg-yacc.sh2
-rwxr-xr-xt/subpkg.sh2
-rwxr-xr-xt/txinfo-makeinfo-error-no-clobber.sh1
-rwxr-xr-xt/txinfo-no-split.sh94
-rwxr-xr-xt/vala-libs.sh3
-rwxr-xr-xt/vala-non-recursive-setup.sh1
-rwxr-xr-xt/yacc-grepping2.sh4
-rwxr-xr-xt/yacc-line.sh4
37 files changed, 357 insertions, 196 deletions
diff --git a/PLANS/obsolete-removed/am-prog-mkdir-p.txt b/PLANS/obsolete-removed/am-prog-mkdir-p.txt
index b096ecece..4143fac85 100644
--- a/PLANS/obsolete-removed/am-prog-mkdir-p.txt
+++ b/PLANS/obsolete-removed/am-prog-mkdir-p.txt
@@ -1,67 +1,9 @@
-In Automake 1.13.x
-------------------
+We have dropped any plan to remove the obsolescent macro AM_PROG_MKDIR_P,
+(today just an alias for the Autoconf-provided macro AC_PROG_MKDIR_P), as
+well as the related $(mkdir_p) make variable and the @mkdir_p@ configure
+substitution.
-We had already scheduled the removal of the long-deprecated AM_PROG_MKDR_P
-macro (superseded by the autoconf-provided one AC_PROG_MKDIR_P) for
-Automake 1.13 -- see commit 'v1.12-20-g8a1c64f'.
+That planned removal has already proven source of countless headaches and
+backward-compatibility issues, which vastly outweigh any "clean-up benefit"
+we would get from the removal of that obsolescent but unobtrusive cruft.
-Alas, it turned out the latest Gettext version at the time (0.18.1.1) was
-still using that macro:
-
- <http://lists.gnu.org/archive/html/automake/2012-09/msg00010.html>
-
-And since the maintenance of Gettext was stalled, we couldn't get a fix
-committed and released in time for the appearance of automake 1.13:
-
- <http://lists.gnu.org/archive/html/bug-gettext/2012-04/msg00018.html>
- <http://lists.gnu.org/archive/html/bug-gettext/2012-06/msg00012.html>
- <http://lists.gnu.org/archive/html/bug-gettext/2012-10/msg00001.html>
-
-So, on a strong advice by Jim Meyering, in commit 'v1.12.4-158-gdf23daf'
-we re-introduced AM_PROG_MKDIR_P in Automake. That has been an
-unfortunate necessity (thanks to Jim for having convinced me of that in
-time!)
-
-
-For Automake 1.14
------------------
-
-Finally, AM_PROG_MKDR_P we'll be fully obsolete in in Automake 1.14 (see
-commit 'v1.12.4-174-g5a28948', merged in master by 'v1.13-5-gb373ad9'),
-while still offering a clear error message for the moment (see follow-up
-commit 'v1.13-30-gd01834b').
-
-We can finally do so because Gettext has got a maintainer in the meantime,
-and a new release has been made that no longer uses AM_PROG_MKDIR_P:
-
- <http://lists.gnu.org/archive/html/bug-gettext/2012-12/msg00064.html>
-
-We still keep the obsolete '@mkdir_p@' substitution and '$(mkdir_p)'
-variable around though, since they are still used by 'Makefile.in.in'
-template from gettext:
-
- $ cd ~/src/gettext
- $ git checkout master
- $ git describe
- v0.18.2-4-g3188bbf
- $ grep mkdir_p gettext-runtime/po/Makefile.in.in | grep -v '^#'
- mkdir_p = @mkdir_p@
- $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
- $(mkdir_p) $(DESTDIR)$$dir; \
- $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
- $(mkdir_p) $(DESTDIR)$$dir; \
-
-(see also Automake commit v1.12.1-112-g2551021).
-
-More to the point, it's almost impossible to diagnose usages of those
-macro and substitution using the existing Automake parsing and warning
-infrastructure; it's much easier to just keep them around for a while.
-
-
-The future
-----------
-
-We want to finally remove '@mkdir_p@' and '$(mkdir_p)' as well some
-day. It would be nice if we could do so with some kind of deprecation,
-but that is not worth too much work. Anyway, no hurry an no high
-priority for this removal.
diff --git a/PLANS/subdir-objects.txt b/PLANS/subdir-objects.txt
index e3aec6be8..e4e6e25ad 100644
--- a/PLANS/subdir-objects.txt
+++ b/PLANS/subdir-objects.txt
@@ -24,33 +24,28 @@ Alas, since this also means changing the default behaviour of Automake
('subdir-objects' is not enabled by default, sadly), this means the
transition path will be less smooth than I'd like.
-For automake 1.13.2 (ASAP)
---------------------------
+DONE for automake 1.13.2
+------------------------
-Fix the bug spotted by Nick Bowler:
+The bug spotted by Nick Bowler:
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#35>
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#44>
-and exposed in test case 't/ccnoco4.sh': currently, Automake-generated
-C compilation rules mistakenly pass the "-c -o" options combination
-unconditionally (even to losing compiler) when the 'subdir-objects' is
-used but sources are only present in the top-level directory.
+and exposed in test case 't/ccnoco4.sh' has been fixed (see commit
+v1.13.1-56-g34001a9). The bug was due to the fact that Automake-generated
+C compilation rules mistakenly passed the "-c -o" options combination
+unconditionally (even to losing compiler) when the 'subdir-objects' was
+used but sources were only present in the top-level directory.
-For automake 1.13.2 (with more ease)
-------------------------------------
+TODO for automake 1.13.2
+------------------------
Give a warning in the category 'unsupported' if the 'subdir-objects'
option is not specified. This should give the users enough forewarning
about the planned change, and give them time to update their packages
to the new semantic.
-This warning, when there are C sources in subdirs, should also mention the
-need to use AM_PROG_CC_C_O in configure.ac (thanks to Peter Breitenlohner
-for suggesting this). This is not strictly required, but will make
-things a little simpler for the users, by giving a more complete feedback:
-<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#29>
-
Be sure to avoid the warning when it would be irrelevant, i.e., if all
source files sit in "current" directory (thanks to Peter Johansson for
suggesting this).
@@ -58,10 +53,14 @@ suggesting this).
For automake 1.14
-----------------
-Flip the 'subdir-object' option on by default. At the same time,
-drop support for the "old" behaviour of having object files derived
-from sources in a subdirectory being placed in the current directory
-rather than in that same subdirectory.
+Remove the copy & paste of Autoconf internals in our AC_PROG_CC rewrite
+See the first patch in the series:
+<http://lists.gnu.org/archive/html/automake-patches/2013-01/msg00102.html>
+
+Make the behaviour once activated by the 'subdir-object' option mandatory.
+With that change, we'll drop support for the "old" behaviour of having
+object files derived from sources in a subdirectory being placed in the
+current directory rather than in that same subdirectory.
Still keep the 'subdir-object' option supported (as a simple no-op
now), to save useless churn in our user's build systems.
diff --git a/PLANS/texi/warnings-for-automake-ng-compatibility.txt b/PLANS/texi/warnings-for-automake-ng-compatibility.txt
index 1dd3da336..aca46b4a2 100644
--- a/PLANS/texi/warnings-for-automake-ng-compatibility.txt
+++ b/PLANS/texi/warnings-for-automake-ng-compatibility.txt
@@ -1,5 +1,5 @@
-For automake 1.13.2:
---------------------
+Done in automake 1.13.2:
+------------------------
I have discouraged the use of '.txi' and '.texinfo' suffixes for
Texinfo inputs (see commit 'v1.13.1-6-ge1ed314') and the generation
diff --git a/automake.in b/automake.in
index 102182204..4f10712f6 100644
--- a/automake.in
+++ b/automake.in
@@ -1669,8 +1669,7 @@ sub handle_single_transform ($$$$$%)
$renamed = 1;
}
- # If rewrite said it was ok, put the object into a
- # subdir.
+ # If rewrite said it was ok, put the object into a subdir.
$object = $directory . '/' . $object
unless $directory eq '';
diff --git a/doc/automake-ng.texi b/doc/automake-ng.texi
index 9ee326c0e..9736e65a5 100644
--- a/doc/automake-ng.texi
+++ b/doc/automake-ng.texi
@@ -4034,10 +4034,10 @@ define @code{WITH_DMALLOC} and add @option{-ldmalloc} to @code{LIBS}.
@cindex obsolete macros
Although using some of the following macros was required in past
-releases, you should not use any of them in new code. Also, all
-these macros will be @emph{removed in some future Automake version},
-so you should consider updating your @file{configure.ac} to avoid
-problems in the future.
+releases, you should not use any of them in new code. Also, most
+of these macros will probably be @emph{removed in some future Automake
+version}, so you should consider updating your @file{configure.ac}
+to avoid problems in the future.
@table @code
@@ -4048,6 +4048,25 @@ This is an @emph{obsolete wrapper} around @code{AC_PROG_CC_C_O}. New
code needs not to use this macro. It will be deprecated, and then
removed, in future Automake versions.
+@item AM_PROG_MKDIR_P
+@acindex AM_PROG_MKDIR_P
+@cindex @code{mkdir -p}, macro check
+@vindex MKDIR_P
+@vindex mkdir_p
+
+From Automake 1.8 to 1.9.6 this macro used to define the output
+variable @code{mkdir_p} to one of @code{mkdir -p}, @code{install-sh
+-d}, or @code{mkinstalldirs}.
+
+Nowadays Autoconf provides a similar functionality with
+@code{AC_PROG_MKDIR_P} (@pxref{Particular Programs, , Particular
+Program Checks, autoconf, The Autoconf Manual}), however this defines
+the output variable @code{MKDIR_P} instead. In case you are still
+using the @code{AM_PROG_MKDIR_P} macro in your @file{configure.ac},
+or its provided variable @code{$(mkdir_p)} in your @file{Makefile.am},
+you are advised to switch ASAP to the more modern Autoconf-provided
+interface instead.
+
@end table
@node Private Macros
@@ -6171,10 +6190,10 @@ intended for the @file{Makefile.am} author.
@cindex Multiple @command{lex} lexers
@cindex @command{lex}, multiple lexers
-When @command{lex} or @command{yacc} sources are used, @code{automake
--i} automatically installs an auxiliary program called
-@command{ylwrap} in your package (@pxref{Auxiliary Programs}). This
-program is used by the build rules to rename the output of these
+When @command{lex} or @command{yacc} sources are used, @code{automake -a}
+automatically installs an auxiliary program called @command{ylwrap} in
+your package (@pxref{Auxiliary Programs}).
+This program is used by the build rules to rename the output of these
tools, and makes it possible to include multiple @command{yacc} (or
@command{lex}) source files in a single directory. (This is necessary
because yacc's output file name is fixed, and a parallel make could
diff --git a/lib/ylwrap b/lib/ylwrap
index 97a168c78..384b834cd 100755
--- a/lib/ylwrap
+++ b/lib/ylwrap
@@ -1,7 +1,7 @@
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
-scriptversion=2012-12-28.20; # UTC
+scriptversion=2013-01-12.17; # UTC
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
@@ -40,7 +40,7 @@ get_dirname ()
# guard FILE
# ----------
# The CPP macro used to guard inclusion of FILE.
-guard()
+guard ()
{
printf '%s\n' "$1" \
| sed \
@@ -96,17 +96,17 @@ esac
# The input.
-input="$1"
+input=$1
shift
# We'll later need for a correct munging of "#line" directives.
input_sub_rx=`get_dirname "$input" | quote_for_sed`
-case "$input" in
+case $input in
[\\/]* | ?:[\\/]*)
# Absolute path; do nothing.
;;
*)
# Relative path. Make it absolute.
- input="`pwd`/$input"
+ input=`pwd`/$input
;;
esac
input_rx=`get_dirname "$input" | quote_for_sed`
@@ -124,8 +124,8 @@ sed_fix_filenames=
# guard in its implementation file.
sed_fix_header_guards=
-while test "$#" -ne 0; do
- if test "$1" = "--"; then
+while test $# -ne 0; do
+ if test x"$1" = x"--"; then
shift
break
fi
@@ -138,16 +138,14 @@ while test "$#" -ne 0; do
done
# The program to run.
-prog="$1"
+prog=$1
shift
# Make any relative path in $prog absolute.
-case "$prog" in
+case $prog in
[\\/]* | ?:[\\/]*) ;;
- *[\\/]*) prog="`pwd`/$prog" ;;
+ *[\\/]*) prog=`pwd`/$prog ;;
esac
-# FIXME: add hostname here for parallel makes that run commands on
-# other machines. But that might take us over the 14-char limit.
dirname=ylwrap$$
do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
@@ -173,7 +171,7 @@ if test $ret -eq 0; then
# otherwise prepend '../'.
case $to in
[\\/]* | ?:[\\/]*) target=$to;;
- *) target="../$to";;
+ *) target=../$to;;
esac
# Do not overwrite unchanged header files to avoid useless
@@ -182,7 +180,7 @@ if test $ret -eq 0; then
# output of all other files to a temporary file so we can
# compare them to existing versions.
if test $from != $parser; then
- realtarget="$target"
+ realtarget=$target
target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'`
fi
diff --git a/m4/init.m4 b/m4/init.m4
index 38b77cc7b..d8166e72c 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -75,11 +75,6 @@ AM_MISSING_PROG([MAKEINFO], [makeinfo])
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-# For better backward compatibility. To be removed once Automake 1.9.x
-# dies out for good. For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
-AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
diff --git a/m4/obsolete-err.m4 b/m4/obsolete-err.m4
index a94a651bd..1ba6df354 100644
--- a/m4/obsolete-err.m4
+++ b/m4/obsolete-err.m4
@@ -1,6 +1,5 @@
# -*- Autoconf -*-
-# Obsolete and "removed" macros, that must however still report explicit
-# error messages when used, to smooth transition.
+# Deprecated, obsolescent or and obsolete macros.
#
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
@@ -8,6 +7,14 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])dnl
+AC_DIAGNOSE([obsolete],
+[macro '$0' is deprecated.
+You should use the Autoconf-provided 'AC][_PROG_MKDIR_P' macro instead,
+and use '$(MKDIR_P)' instead of '$(mkdir_p)' in your Makefile.am files.])])
+
dnl TODO: Remove in Automake 1.15.
AC_DEFUN([AM_CONFIG_HEADER],
[AC_FATAL(['$0': this macro is obsolete.
@@ -20,13 +27,6 @@ AC_DEFUN([AM_PROG_CC_STDC],
Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
but upon 'ac_cv_prog_cc_stdc'.])])
-dnl TODO: Remove in Automake 1.16.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_FATAL(['$0': this macro is obsolete.
- You should simply use the 'AC][_PROG_MKDIR_P' macro instead, and
- use '$(MKDIR_P)' instead of '$(mkdir_p)' in your Makefile.am
- files.])])
-
dnl TODO: Remove in Automake 1.14.
AC_DEFUN([AM_C_PROTOTYPES],
[AC_FATAL([automatic de-ANSI-fication support has been removed])])
diff --git a/maintainer/syntax-checks.mk b/maintainer/syntax-checks.mk
index 454341e34..afbba5ece 100644
--- a/maintainer/syntax-checks.mk
+++ b/maintainer/syntax-checks.mk
@@ -617,3 +617,7 @@ sc_at_in_texi:
$(syntax_check_rules): automake aclocal
maintainer-check: $(syntax_check_rules)
.PHONY: maintainer-check $(syntax_check_rules)
+
+# I'm a lazy typist.
+lint: maintainer-check
+.PHONY: lint
diff --git a/t/am-prog-mkdir-p-no-more.sh b/t/am-prog-mkdir-p-no-more.sh
deleted file mode 100755
index 78a3ef9bc..000000000
--- a/t/am-prog-mkdir-p-no-more.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2012-2013 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 any attempt to use the obsolete macro AM_PROG_MKDIR_P
-# elicits clear and explicit fatal errors.
-
-. test-init.sh
-
-geterr ()
-{
- "$@" -Wnone 2>stderr && { cat stderr >&2; exit 1; }
- cat stderr >&2
- grep "^configure\.ac:4:.*'AM_PROG_MKDIR_P'.*obsolete" stderr
- grep "'AC_PROG_MKDIR_P'.* instead" stderr
- grep " use '\$(MKDIR_P)' instead of '\$(mkdir_p)'.*Makefile" stderr
-}
-
-$ACLOCAL
-mv aclocal.m4 aclocal.sav
-
-echo AM_PROG_MKDIR_P >> configure.ac
-
-geterr $ACLOCAL
-test ! -f aclocal.m4
-
-cat aclocal.sav "$am_automake_acdir"/obsolete-err.m4 > aclocal.m4
-
-geterr $AUTOCONF
-geterr $AUTOMAKE
-
-:
diff --git a/t/mkdir_p.sh b/t/am-prog-mkdir-p.sh
index 2e834239a..ad5a810f8 100755
--- a/t/mkdir_p.sh
+++ b/t/am-prog-mkdir-p.sh
@@ -14,38 +14,53 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# AM_INIT_AUTOMAKE should still define $(mkdir_p), for backward
+# Check that the AM_PROG_MKDIR_P macro is deprecated, but still works.
+# We should should also still define $(mkdir_p), for backward
# compatibility.
. test-init.sh
-cat >> configure.ac << 'END'
+cat >> configure.ac <<'END'
AC_CONFIG_FILES([sub/Makefile])
+AM_PROG_MKDIR_P
AC_OUTPUT
END
cat > Makefile.am << 'END'
SUBDIRS = sub
all-local:
- $(mkdir_p) . dir1/a
- @mkdir_p@ . dir2/b
+ $(MKDIR_P) . dir1/a
+ $(mkdir_p) . dir2/b
+ @MKDIR_P@ . dir3/c
+ @mkdir_p@ . dir4/d
check-local: all
test -d dir1/a
test -d dir2/b
test -d dir3/c
- test -d dir3/d
+ test -d dir4/d
+ test -d dir5/e
+ test -d dir5/f
+ test -d dir5/g
END
mkdir sub
cat > sub/Makefile.am << 'END'
-# '$(mkdir_p)' should continue to work even in subdir makefiles.
+# Even '$(mkdir_p)' should continue to work also in subdir makefiles.
all-local:
- $(mkdir_p) .. ../dir3/c
- @mkdir_p@ .. ../dir3/d
+ $(MKDIR_P) .. ../dir5/d
+ $(mkdir_p) .. ../dir5/e
+ @MKDIR_P@ .. ../dir5/f
+ @mkdir_p@ .. ../dir5/g
END
$ACLOCAL
-$AUTOCONF -Werror -Wall
+$AUTOCONF -Wnone -Wobsolete -Werror 2>stderr && { cat stderr >&2; exit 1; }
+cat stderr >&2
+grep "^configure\\.ac:5:.*'AM_PROG_MKDIR_P'.*deprecated" stderr
+grep "[Aa]utoconf-provided 'AC_PROG_MKDIR_P'.* instead" stderr
+grep "'\$(MKDIR_P)' instead of '\$(mkdir_p)'" stderr
+
+$AUTOCONF -Wno-obsolete
$AUTOMAKE
./configure
diff --git a/t/ax/depcomp.sh b/t/ax/depcomp.sh
index 8eb69c9ab..1534d5f8e 100644
--- a/t/ax/depcomp.sh
+++ b/t/ax/depcomp.sh
@@ -130,7 +130,7 @@ check_distclean ()
cat > configure.ac <<END
AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([subdir-objects])
AC_PROG_CC
AM_PROG_AR
$(if test $depcomp_with_libtool = yes; then
diff --git a/t/cscope.tap b/t/cscope.tap
index 5fc455b7f..97d5c9ff8 100755
--- a/t/cscope.tap
+++ b/t/cscope.tap
@@ -22,8 +22,10 @@ plan_ 18
ocwd=$(pwd) || fatal_ "getting top-level directory"
-cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/Makefile])
+cat > configure.ac << 'END'
+AC_INIT([cscope-test], [1.0])
+AM_INIT_AUTOMAKE([subdir-objects])
+AC_CONFIG_FILES([Makefile 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 aa46c4dcf..626ab8c89 100755
--- a/t/depcomp8a.sh
+++ b/t/depcomp8a.sh
@@ -48,7 +48,9 @@ int bar (void)
END
$ACLOCAL
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
grep include Makefile.in # For debugging.
grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
diff --git a/t/depcomp8b.sh b/t/depcomp8b.sh
index bd7dab8db..aa5e705ea 100755
--- a/t/depcomp8b.sh
+++ b/t/depcomp8b.sh
@@ -30,6 +30,9 @@ 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
diff --git a/t/ext2.sh b/t/ext2.sh
index 83b241f7a..0cc916862 100755
--- a/t/ext2.sh
+++ b/t/ext2.sh
@@ -25,6 +25,7 @@ AC_PROG_CXX
EOF
cat >Makefile.am <<EOF
+AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = p q r
p_SOURCES = a.cc b.cpp c.cxx
q_SOURCES = sub/d.cc sub/e.cpp sub/f.cxx
diff --git a/t/extra-portability.sh b/t/extra-portability.sh
index a2df3f3e6..ec983fdda 100755
--- a/t/extra-portability.sh
+++ b/t/extra-portability.sh
@@ -40,7 +40,7 @@ $ACLOCAL
cat >Makefile.am <<END
EXTRA_LIBRARIES = libfoo.a
-libfoo_a_SOURCES = sub/foo.c
+libfoo_a_SOURCES = foo.c
END
# Sanity check: extra-portability warnings causes the expected error.
diff --git a/t/fort2.sh b/t/fort2.sh
index 76e189e41..3a62237c3 100755
--- a/t/fort2.sh
+++ b/t/fort2.sh
@@ -35,6 +35,8 @@ AC_OUTPUT
END
cat >Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+FC = fake-fc
bin_PROGRAMS = hello goodbye
hello_SOURCES = hello.f90 foo.f95 sub/bar.f95 hi.f03 sub/howdy.f03 \
greets.f08 sub/bonjour.f08
@@ -64,7 +66,7 @@ $AUTOCONF
touch hello.f90 foo.f95 sub/bar.f95 hi.f03 sub/howdy.f03 greets.f08 \
sub/bonjour.f08 bye.f95 sub/baz.f90
-$MAKE -n FC=fake-fc \
+$MAKE -n \
FCFLAGS_f90=--@90 FCFLAGS_f95=--@95 FCFLAGS_f03=--@03 FCFLAGS_f08=--@08 \
> stdout || { cat stdout; exit 1; }
cat stdout
diff --git a/t/fort4.sh b/t/fort4.sh
index c14b92661..2d01ee46d 100755
--- a/t/fort4.sh
+++ b/t/fort4.sh
@@ -87,7 +87,7 @@ test-obj:
END
$ACLOCAL
-$AUTOMAKE -a
+$AUTOMAKE -a -Wno-unsupported
# The Fortran 77 linker should be preferred:
grep '.\$(FCLINK)' Makefile.in && exit 1
diff --git a/t/fort5.sh b/t/fort5.sh
index 88fefe558..d090f6ffd 100755
--- a/t/fort5.sh
+++ b/t/fort5.sh
@@ -75,7 +75,9 @@ END
libtoolize --force
$ACLOCAL
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
$AUTOCONF
# This test requires Libtool >= 2.0. Earlier Libtool does not
diff --git a/t/gettext-macros.sh b/t/gettext-macros.sh
index 8ef4ef4ff..5a9324012 100755
--- a/t/gettext-macros.sh
+++ b/t/gettext-macros.sh
@@ -62,7 +62,10 @@ AM_GNU_GETTEXT
AM_GNU_GETTEXT_VERSION([$autopoint_version])
END
-if ! ($am_gettextize_command --force && test -f m4/gettext.m4); then
+if $am_gettextize_command --force && test -f m4/gettext.m4; then
+ echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
+ echo "export ACLOCAL_PATH" >> get.sh
+else
# Older versions of gettext might not have a gettextize program
# available, but this doesn't mean the user hasn't made the gettext
# macros available, e.g., by properly setting ACLOCAL_PATH.
@@ -76,12 +79,12 @@ if ! ($am_gettextize_command --force && test -f m4/gettext.m4); then
fi
fi
-echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
-echo "export ACLOCAL_PATH" >> 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.
-echo 'AC_DEFUN([AM_PROG_MKDIR_P], [AC_PROG_MKDIR_P([$@])])' >m4/am-mkdirp.m4
+ACLOCAL="$ACLOCAL -Wno-obsolete"
+AUTOMAKE="$AUTOMAKE -Wno-obsolete"
+END
. ./get.sh
diff --git a/t/lex-line.sh b/t/lex-line.sh
index 7eca2d8f3..36faef14c 100755
--- a/t/lex-line.sh
+++ b/t/lex-line.sh
@@ -66,7 +66,9 @@ c_outputs='zardoz.c dir/bar-quux.c'
$ACLOCAL
$AUTOCONF
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
for vpath in : false; do
diff --git a/t/lex-multiple.sh b/t/lex-multiple.sh
new file mode 100755
index 000000000..e1c71a1ab
--- /dev/null
+++ b/t/lex-multiple.sh
@@ -0,0 +1,107 @@
+#! /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 we can build a program using several lexers at once
+# (assuming Flex is used). That is a little tricky, but possible.
+# See:
+# <http://lists.gnu.org/archive/html/automake/2010-10/msg00081.html>
+# <http://lists.gnu.org/archive/html/automake/2009-03/msg00061.html>
+
+required='cc flex'
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_PROG_LEX
+AM_PROG_AR
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = zardoz
+
+zardoz_SOURCES = main.c
+# Convenience libraries.
+noinst_LIBRARIES = liblex.a liblex-foo.a liblex-bar.a
+zardoz_LDADD = $(noinst_LIBRARIES)
+
+liblex_a_SOURCES = 0.l
+
+# We need the output to always be named 'lex.yy.c', in order for
+# ylwrap to pick it up.
+liblex_foo_a_LFLAGS = -Pfoo --outfile=lex.yy.c
+liblex_foo_a_SOURCES = a.l
+
+# Ditto.
+liblex_bar_a_LFLAGS = -Pbar_ --outfile=lex.yy.c
+liblex_bar_a_SOURCES = b.l
+END
+
+cat > main.c << 'END'
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int main (int argc, char *argv[])
+{
+ if (argc != 2)
+ abort ();
+ else if (!strcmp(argv[1], "--vanilla"))
+ return (yylex () != 121);
+ else if (!strcmp(argv[1], "--foo"))
+ return (foolex () != 121);
+ else if (!strcmp(argv[1], "--bar"))
+ return (bar_lex () != 121);
+ else
+ abort ();
+}
+END
+
+cat > 0.l << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
+%%
+"VANILLA" { printf (":%s:\n", yytext); return 121; }
+. { printf (":%s:\n", yytext); return 1; }
+%%
+/* Avoid possible link errors. */
+int yywrap (void) { return 1; }
+END
+
+sed 's/VANILLA/FOO/' 0.l > a.l
+sed 's/VANILLA/BAR/' 0.l > b.l
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+$MAKE
+
+if ! cross_compiling; then
+ echo VANILLA | ./zardoz --vanilla
+ echo FOO | ./zardoz --foo
+ echo BAR | ./zardoz --bar
+ ./zardoz --vanilla </dev/null && exit 1
+ echo BAR | ./zardoz --foo && exit 1
+ : For shells with busted 'set -e'.
+fi
+
+$MAKE distcheck
+
+:
diff --git a/t/libtool3.sh b/t/libtool3.sh
index 423d6ab0a..106aaab63 100755
--- a/t/libtool3.sh
+++ b/t/libtool3.sh
@@ -28,6 +28,10 @@ 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
diff --git a/t/ltinstloc.sh b/t/ltinstloc.sh
index b9670cbac..bae3d49df 100755
--- a/t/ltinstloc.sh
+++ b/t/ltinstloc.sh
@@ -35,6 +35,7 @@ lib_LTLIBRARIES = liba1.la sub/liba2.la
pkglib_LTLIBRARIES = liba1.la
nobase_lib_LTLIBRARIES = sub/liba2.la
endif
+AUTOMAKE_OPTIONS = subdir-objects
END
libtoolize
diff --git a/t/ltorder.sh b/t/ltorder.sh
index fe9d7bda2..c243ac78b 100755
--- a/t/ltorder.sh
+++ b/t/ltorder.sh
@@ -27,6 +27,7 @@ AC_OUTPUT
END
cat >Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
nobase_lib_LTLIBRARIES = liba1.la sub/liba2.la sub/liba3.la liba4.la liba5.la
sub_liba2_la_LIBADD = liba1.la
sub_liba3_la_LIBADD = sub/liba2.la
diff --git a/t/parallel-tests-suffix-prog.sh b/t/parallel-tests-suffix-prog.sh
index 64f103c70..7b924a33b 100755
--- a/t/parallel-tests-suffix-prog.sh
+++ b/t/parallel-tests-suffix-prog.sh
@@ -27,6 +27,7 @@ AC_OUTPUT
END
cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
## Note that automake should not match the '/test' part of 'sub/test' as
## '.test' suffix, nor the '/chk' part of 'sub/chk' as '.chk' suffix.
TESTS = $(dist_TESTS) $(check_PROGRAMS)
diff --git a/t/specflg9.sh b/t/specflg9.sh
index 3e0c69484..4f3d3b0c2 100755
--- a/t/specflg9.sh
+++ b/t/specflg9.sh
@@ -24,6 +24,7 @@ AC_OUTPUT
END
cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = zzfoo zzbar
zzfoo_SOURCES = sub/foo.c
zzbar_SOURCES = bar.c
diff --git a/t/subobj7.sh b/t/subobj7.sh
index 5dc9ea861..de73cc2dc 100755
--- a/t/subobj7.sh
+++ b/t/subobj7.sh
@@ -25,6 +25,7 @@ AC_OUTPUT
END
cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = wish
wish_SOURCES = foo.c generic/a.c
END
diff --git a/t/subpkg-yacc.sh b/t/subpkg-yacc.sh
index c270ec70c..fc637ccb1 100755
--- a/t/subpkg-yacc.sh
+++ b/t/subpkg-yacc.sh
@@ -55,7 +55,7 @@ mkdir lib/src
cat >lib/configure.ac <<'EOF'
AC_INIT([lib], [2.3])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([subdir-objects])
AC_PROG_RANLIB
AC_PROG_YACC
dnl This comes after YACC and RANLIB checks, deliberately.
diff --git a/t/subpkg.sh b/t/subpkg.sh
index 93da7179a..d7f117a06 100755
--- a/t/subpkg.sh
+++ b/t/subpkg.sh
@@ -62,7 +62,7 @@ mkdir lib/src
cat >lib/configure.ac <<'EOF'
AC_INIT([lib], [2.3])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([subdir-objects])
AC_CONFIG_MACRO_DIR([../m4])
AM_PROG_AR
AC_PROG_RANLIB
diff --git a/t/txinfo-makeinfo-error-no-clobber.sh b/t/txinfo-makeinfo-error-no-clobber.sh
index 41f627f52..c567e89f0 100755
--- a/t/txinfo-makeinfo-error-no-clobber.sh
+++ b/t/txinfo-makeinfo-error-no-clobber.sh
@@ -67,6 +67,5 @@ mv main.old main.texi
$MAKE && exit 1
test -f main.info
test -f sub/main.info
-test -f sub/main.info
:
diff --git a/t/txinfo-no-split.sh b/t/txinfo-no-split.sh
new file mode 100755
index 000000000..aecf7e735
--- /dev/null
+++ b/t/txinfo-no-split.sh
@@ -0,0 +1,94 @@
+#! /bin/sh
+# Copyright (C) 2013 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/>.
+
+# Info split files should not be produced (automake bug#13351).
+
+required=makeinfo
+. test-init.sh
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am <<'END'
+MAKEINFO = makeinfo --split-size 10
+info_TEXINFOS = foo.texi
+
+test-split: # A sanity check.
+ $(MAKEINFO) -o split.info foo.texi
+
+check-local:
+ test -f $(srcdir)/foo.info
+ test ! -f $(srcdir)/foo.info-1
+ test "`find $(srcdir) . | grep '\.info'`" = "$(srcdir)/foo.info"
+END
+
+cat > foo.texi << 'END'
+\input texinfo
+@setfilename foo.info
+@settitle foo
+@dircategory Dummy utilities
+@direntry
+* Foo: (foo). Does nothing at all.
+@end direntry
+
+@node Top
+@top Foo
+
+@menu
+* Intro:: Introduction
+* Planets:: List of Planets
+@end menu
+
+@node Intro
+@chapter Introduction
+Will list planets.
+
+@node Planets
+@chapter List of planets
+Hello Mercury.
+Hello Venus
+Hello Earth
+Hello Mars.
+Hello Jupiter.
+Hello Saturn.
+Hello Uran.
+Hello Neptune.
+Hello Pluto.
+@bye
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE test-split
+ls -l # For debugging.
+test -f split.info
+test -f split.info-1
+test -f split.info-2
+rm -f split*
+
+$MAKE
+
+ls -l # For debugging.
+test -f foo.info
+test ! -f foo.info-1
+test "$(find . | $FGREP '.info' | sed 's|^\./||')" = foo.info
+
+$MAKE distcheck
+
+:
diff --git a/t/vala-libs.sh b/t/vala-libs.sh
index 9fc0f8cf7..bd8136eb5 100755
--- a/t/vala-libs.sh
+++ b/t/vala-libs.sh
@@ -31,6 +31,7 @@ AC_OUTPUT
END
cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
lib_LIBRARIES = libmu.a
lib_LTLIBRARIES = src/libzardoz.la
libmu_a_SOURCES = mu.vala mu2.c mu.vapi mu2.h
@@ -75,7 +76,7 @@ int main ()
}
END
-mkdir src
+mkdir -p src
cat > src/zardoz-foo.vala << 'END'
using GLib;
public class Foo {
diff --git a/t/vala-non-recursive-setup.sh b/t/vala-non-recursive-setup.sh
index ad84e2466..6e35abfa6 100755
--- a/t/vala-non-recursive-setup.sh
+++ b/t/vala-non-recursive-setup.sh
@@ -39,6 +39,7 @@ public class Zardoz {
END
cat > 'Makefile.am' <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = src/zardoz
src_zardoz_CFLAGS = $(GOBJECT_CFLAGS)
src_zardoz_LDADD = $(GOBJECT_LIBS)
diff --git a/t/yacc-grepping2.sh b/t/yacc-grepping2.sh
index 8231fbf9a..b00ece765 100755
--- a/t/yacc-grepping2.sh
+++ b/t/yacc-grepping2.sh
@@ -30,7 +30,9 @@ cat > Makefile.am << 'END'
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
@@ -43,7 +45,9 @@ maude_SOURCES = sub/maude.y
## A particularly tricky case.
maude_YFLAGS = -d
END
+
$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
diff --git a/t/yacc-line.sh b/t/yacc-line.sh
index f57bb394c..923fe7b57 100755
--- a/t/yacc-line.sh
+++ b/t/yacc-line.sh
@@ -57,7 +57,9 @@ c_outputs='zardoz.c dir/quux.c baz-zardoz.c'
$ACLOCAL
$AUTOCONF
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
for vpath in : false; do