automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11-1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11-1803-g70545cd
Date: Wed, 25 Jan 2012 22:56:09 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=70545cdb4b088ebeabe08785ec75647bd27f0f72

The branch, ng/master has been updated
       via  70545cdb4b088ebeabe08785ec75647bd27f0f72 (commit)
       via  bd34a47c51ebc57cce6e9e184630ced52dc71203 (commit)
       via  3794d01e0d62f5f93118ca6b3c75ddc84995d541 (commit)
       via  587ff343ab8d0d7781775eba4e65a4db9d61cc98 (commit)
       via  59c4e1c0d6c687d5f46e2393374db8b98c0a8675 (commit)
       via  6f161e0dfd28854195c9ad6c16219a23ca1097e8 (commit)
       via  7700b7035c6ad8cff1c4fd37d61154f3766b9f09 (commit)
       via  a354283eb7d49574b6c4390fb338b78906a446ed (commit)
       via  8de4149eb90140c81e19b375249cba4659c03f6d (commit)
       via  92174b5abeaa235f97cf65783964ec6d50d43a76 (commit)
       via  98763f1508a86d98b8891ae422dc20315b3a3cbb (commit)
       via  bc940cb035d1ab2eac1b3c353c0516516c145b79 (commit)
       via  3a422887c20556cc9f5e4a856c046f336f2997b4 (commit)
       via  8557c8a78b64243b8f64122e8e1b1f8bd72265a0 (commit)
       via  b08103fedac9fbdf0a24f9192a901ea4b01e45af (commit)
       via  d266b5f7fb2fbb7fddb5b8515d57c32b45a50c67 (commit)
       via  8ddff1004c14bf94d9bcaf1c3b2a29da58e7adf7 (commit)
       via  e5ae760b9d7d79839a81d847433d44d5cdb2fef7 (commit)
       via  91158d7245f194f7fc40d8da8965c59965112601 (commit)
       via  c5df21e8dde255778896e512f7b7b037049dbf7e (commit)
       via  84fbf466f32d0e47291a91d620f7d4831bba34fe (commit)
       via  be0d69f0467763fca65d3acd1bfe0e03ff987206 (commit)
      from  1595c2b5a4efff02929ba8610bdda492d2b931a7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 70545cdb4b088ebeabe08785ec75647bd27f0f72
Merge: 1595c2b bd34a47
Author: Stefano Lattarini <address@hidden>
Date:   Wed Jan 25 23:51:11 2012 +0100

    Merge branch 'master' into ng/master
    
    * master:
      multilib: move to contrib
      tests: improve diagnostics when write(2) fails
      readme: how to run the testsuite with cross-compilers
      tests: no need to unset CFLAGS in tests requiring 'gcc' anymore
      test defs: allow compilers to be auto-selected on user's request
      test defs: substitute compilers and flags found at configure time
      test defs: setup `*FLAGS' variables for GNU compilers
      configure: search generic compilers for use in the tests
      tests: remove redundant 'set -e' calls
      tests: fix spurious failure due to autom4te caching
      dist tests: missing 'compress' program was causing spurious failures
      vala: fix name of temporary file used in vala rules
      vala tests: add missing 'valac' requirement, and other minor fixlets
      news: fix grammaro
      fixup: distribute 'contrib/multilib/multi.m4'
      multilib: deprecate, will be moved to contrib
      fixlet: flags for Fortran77 compiler are in FFLAGS, not F77FLAGS
      cosmetics: fix a botched comment in a maintainer check
    
    + Extra edits:
    
    * contrib/multilib/multilib.am: Don't use $(AM_MAKEFLAGS) in
    recursive make invocations.

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                            |    7 +--
 NEWS                                   |    6 ++-
 automake.in                            |   23 +------
 configure.ac                           |  111 +++++++++++++++++++++++++++++++-
 contrib/Makefile.am                    |    5 ++
 contrib/multilib/README                |    9 +++
 {lib => contrib/multilib}/config-ml.in |    0
 {m4 => contrib/multilib}/multi.m4      |   12 ++--
 contrib/multilib/multilib.am           |   47 +++++++++++++
 {lib => contrib/multilib}/symlink-tree |    0
 doc/automake.texi                      |   40 +-----------
 lib/Automake/Variable.pm               |    2 +-
 lib/Makefile.am                        |    6 +-
 lib/am/Makefile.am                     |    1 -
 lib/am/multilib.am                     |   61 -----------------
 m4/Makefile.am                         |    1 -
 tests/Makefile.am                      |   13 ++++
 tests/README                           |   23 ++++---
 tests/aclocal-install-absdir.test      |    4 +-
 tests/ccnoco.test                      |    4 -
 tests/ccnoco3.test                     |    4 -
 tests/defs                             |   91 +++++++++++++++++++++-----
 tests/defs-static.in                   |   18 +++++
 tests/dist-formats.tap                 |   13 ++--
 tests/distcheck-pr10470.test           |    2 -
 tests/help-multilib.test               |    6 +-
 tests/lzma.test                        |    5 +-
 tests/multlib.test                     |   44 ++++++++++---
 tests/objext-pr10128.test              |    2 -
 tests/parallel-tests-dry-run-1.test    |    2 -
 tests/parallel-tests-fd-redirect.test  |   16 +++--
 tests/tar-override.test                |    4 +-
 tests/vala-mix.test                    |    7 +-
 tests/vala-vpath.test                  |    2 -
 tests/vala.test                        |    5 ++
 35 files changed, 377 insertions(+), 219 deletions(-)
 create mode 100644 contrib/multilib/README
 rename {lib => contrib/multilib}/config-ml.in (100%)
 rename {m4 => contrib/multilib}/multi.m4 (89%)
 create mode 100644 contrib/multilib/multilib.am
 rename {lib => contrib/multilib}/symlink-tree (100%)
 delete mode 100644 lib/am/multilib.am

diff --git a/Makefile.am b/Makefile.am
index bb40e37..2d24c5f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -917,18 +917,15 @@ WGET_SV_CVS = $(WGET) 
http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/
 WGET_SV_GIT_CF = $(WGET) 
'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f='
 WGET_SV_GIT_AC = $(WGET) 
'http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob_plain;hb=HEAD;f='
 WGET_SV_GIT_GL = $(WGET) 
'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f='
-WGET_GCC = $(WGET) 'http://gcc.gnu.org/viewcvs/*checkout*/trunk/'
 
 ## Files that we fetch and which we compare against.
 ## FIXME should be a lot more here
 FETCHFILES = \
 INSTALL \
-config-ml.in \
 config.guess \
 config.sub \
 gnupload \
 gitlog-to-changelog \
-symlink-tree \
 texinfo.tex
 
 ## Fetch the latest versions of files we care about.
@@ -942,9 +939,7 @@ fetch:
        $(WGET_SV_CVS)texinfo/texinfo/doc/texinfo.tex -O texinfo.tex && \
        $(WGET_SV_GIT_GL)doc/INSTALL -O INSTALL && \
        $(WGET_SV_GIT_GL)build-aux/gnupload -O gnupload && \
-       $(WGET_SV_GIT_GL)build-aux/gitlog-to-changelog -O gitlog-to-changelog 
&& \
-       $(WGET_GCC)config-ml.in -O config-ml.in && \
-       $(WGET_GCC)symlink-tree -O symlink-tree)
+       $(WGET_SV_GIT_GL)build-aux/gitlog-to-changelog -O gitlog-to-changelog)
 ## Don't exit after test because we want to give as many errors as
 ## possible.
        @stat=0; for file in $(FETCHFILES); do \
diff --git a/NEWS b/NEWS
index f2bced6..63796cc 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,10 @@ New in 1.11a:
 
   - Support for automatic de-ANSI-fication has been removed.
 
+  - The support for the "obscure" multilib feature has been removed
+    from Automake core (but remains available in the 'contrib/'
+    directory of the Automake distribution).
+
   - Support for ".log -> .html" conversion and the check-html and
     recheck-html targets has been removed from Automake core (but
     remains available in the 'contrib/' directory of the Automake
@@ -188,7 +192,7 @@ New in 1.11.2a:
   - The master copy of the `gnupload' script is now maintained in gnulib,
     not in automake.
 
-  - The `missing' script don't try to wrap calls to `tar' anymore.
+  - The `missing' script doesn't try to wrap calls to `tar' anymore.
 
   - "make dist" doesn't wrap `tar' invocations with the `missing' script
     anymore.  Similarly, the obsolescent variable `$(AMTAR)' (which you
diff --git a/automake.in b/automake.in
index 2f85dc1..521d6cf 100644
--- a/automake.in
+++ b/automake.in
@@ -386,9 +386,6 @@ my $package_version = '';
 # Where version is defined.
 my $package_version_location;
 
-# TRUE if we've seen AM_ENABLE_MULTILIB.
-my $seen_multilib = 0;
-
 # TRUE if we've seen AM_PROG_AR
 my $seen_ar = 0;
 
@@ -3683,16 +3680,6 @@ sub handle_tags
     }
 }
 
-# Handle multilib support.
-sub handle_multilib
-{
-  if ($seen_multilib && $relative_dir eq '.')
-    {
-      $output_rules .= &file_contents ('multilib', new Automake::Location);
-      push (@all, 'all-multi');
-    }
-}
-
 
 # user_phony_rule ($NAME)
 # -----------------------
@@ -5209,7 +5196,6 @@ sub scan_autoconf_traces ($)
                AC_SUBST_TRACE => 1,
                AM_AUTOMAKE_VERSION => 1,
                AM_CONDITIONAL => 2,
-               AM_ENABLE_MULTILIB => 0,
                AM_GNU_GETTEXT => 0,
                AM_GNU_GETTEXT_INTL_SUBDIR => 0,
                AM_INIT_AUTOMAKE => 0,
@@ -5371,10 +5357,6 @@ sub scan_autoconf_traces ($)
        {
          $configure_cond{$args[1]} = $where;
        }
-      elsif ($macro eq 'AM_ENABLE_MULTILIB')
-       {
-         $seen_multilib = $where;
-       }
       elsif ($macro eq 'AM_GNU_GETTEXT')
        {
          $seen_gettext = $where;
@@ -5892,9 +5874,9 @@ sub lang_vala_finish_target ($$)
 # especially important on systems with sub-second timestamp resolution).
 # Thus we need to create the stamp file *before* invoking valac, and to
 # move it to its final location only after valac has been invoked.
-    "\t${silent}rm -f \$@ && echo stamp > address@hidden".
+    "\t${silent}rm -f \$\@ && echo stamp > address@hidden".
     "\t${verbose}\$(am__cd) \$(srcdir) && ${compile} \$(${derived}_SOURCES)\n".
-    "\t${silent}mv -f address@hidden address@hidden";
+    "\t${silent}mv -f address@hidden address@hidden";
 
   push_dist_common ("${derived}_vala.stamp");
 
@@ -8092,7 +8074,6 @@ sub generate_makefile ($$)
       define_pretty_variable ('DIST_SOURCES', TRUE, INTERNAL, @dist_sources);
     }
 
-  handle_multilib;
   handle_texinfo;
   handle_emacs_lisp;
   handle_python;
diff --git a/configure.ac b/configure.ac
index ddd6b2b..aea14ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,8 +38,11 @@ AC_SUBST([am_AUTORECONF], ["${AUTORECONF-autoreconf}"])
 AC_SUBST([am_AUTOHEADER], ["${AUTOHEADER-autoheader}"])
 AC_SUBST([am_AUTOUPDATE], ["${AUTOUPDATE-autoupdate}"])
 
+dnl We call AC_PROG_CC in an unusual way, and only for use in our
+dnl testsuite, so also use `no-dependencies' and `no-define' among
+dnl the automake options to avoid bloating and potential problems.
 AM_INIT_AUTOMAKE([1.10a dist-xz filename-length-max=99 color-tests
-                 parallel-tests silent-rules])
+                 parallel-tests silent-rules no-define no-dependencies])
 
 # The API version is the base version.  We must guarantee
 # compatibility for all releases with the same API version.
@@ -209,6 +212,112 @@ if test $am_cv_sh_errexit_works = no; then
 fi
 AC_SUBST([sh_errexit_works], [$am_cv_sh_errexit_works])
 
+
+###########################################################################
+
+# Look for C, C++ and fortran compilers to be used in the testsuite.
+
+dnl We don't want to abort our configuration script if no C compiler is
+dnl available, as such a compiler is only required to run part of the
+dnl testsuite, not to build or install Automake.  Ditto for C++, Fortran
+dnl and Fortran 77 compilers.  Unfortunately, autoconf does not offer an
+dnl easy way to obtain this behaviour, so we'll need a few hacks.
+
+dnl We want the body of this macro to expand as a single shell statement,
+dnl thus we wrap it into { ... } brackets.
+AC_DEFUN([_AM_WRAP_MSG_ERROR], [ {
+  AC_MSG_WARN([$1])
+  am__failed=yes
+  break
+} ])
+
+AC_DEFUN([_AM_COMPILER_CAN_FAIL], [
+  m4_pushdef([AC_MSG_FAILURE], m4_defn([_AM_WRAP_MSG_ERROR]))
+  m4_pushdef([AC_MSG_ERROR],   m4_defn([_AM_WRAP_MSG_ERROR]))
+  am__failed=no
+  while :; do
+     $1
+     break
+  done
+  AS_IF([test $am__failed = yes], [$2])
+  # We have to clear these cache variables, so that future checks on
+  # compilers for different languages won't be confused.
+  unset ac_cv_objext ac_cv_exeext
+  # We also need to meddle with the autoconf internals to ensure that
+  # checks to find object and executable extensions will be run anew.
+  # FIXME: In the long run, the better thing to do would be to fix
+  # FIXME: autoconf instead ...
+  m4_undefine([m4_provide(_AC_COMPILER_OBJEXT)])
+  m4_undefine([m4_provide(_AC_COMPILER_EXEEXT)])
+  m4_popdef([AC_MSG_FAILURE])
+  m4_popdef([AC_MSG_ERROR])
+])
+
+# Prefer generic compilers to GNU ones when possible.  This will ensure
+# more testsuite coverage "in the wild".
+# Note that we don't look for the MSVC C/C++ compiler here.  This is
+# deliberate; for more discussion an rationale, see:
+# <http://lists.gnu.org/archive/html/automake-patches/2012-01/msg00130.html>
+
+# C compiler.
+_AM_COMPILER_CAN_FAIL([AC_PROG_CC([cc gcc])], [CC=false])
+AS_IF([test x"$GCC" = x"yes"], [am_CC_is_GNU=yes], [am_CC_is_GNU=no])
+
+# The list of C++ compilers here has been copied, pasted and edited
+# from `lib/autoconf/c.m4:AC_PROG_CXX' in the Autoconf distribution.
+# Keep it in sync, or better again, find out a way to avoid this code
+# duplication.
+_AM_COMPILER_CAN_FAIL([AC_PROG_CXX(dnl
+  [aCC CC FCC KCC RCC xlC_r xlC c++ cxx cc++ gpp g++])],
+  [CXX=false])
+AS_IF([test x"$GXX" = x"yes"], [am_CXX_is_GNU=yes], [am_CXX_is_GNU=no])
+
+# The lists of Fortran compilers here has been copied, pasted and edited
+# from file `lib/autoconf/fortran.m4' in the Autoconf distribution.
+# Keep it in sync, or better again, find out a way to avoid this code
+# duplication.
+
+_AM_COMPILER_CAN_FAIL([AC_PROG_FC(dnl
+  [xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor] dnl
+  [xlf90 f90 pgf90 pghpf epcf90 g95 gfortran])],
+  [FC=false])
+# FIXME this won't work as expected until we can assume autoconf 2.69 :-(
+AS_IF([test x"$GFC" = x"yes"], [am_FC_is_GNU=yes], [am_FC_is_GNU=no])
+
+_AM_COMPILER_CAN_FAIL([AC_PROG_F77(dnl
+  [xlf f77 frt pgf77 cf77 fort77 fl32 af77 g77 gfortran])],
+  [F77=false])
+AS_IF([test x"$G77" = x"yes"], [am_F77_is_GNU=yes], [am_F77_is_GNU=no])
+
+# Some tests will need the GNU compilers.  Searching for them here would
+# be overkill, since our testsuite already handles their search and setup
+# pretty well.  However, in case the compilers detected above at configure
+# time are not the GNU ones, we cannot use the values of CFLAGS, CXXFLAGS,
+# FCFLAGS and FFLAGS detected for them with the GNU compilers too, since
+# it's likely they won't be compatible.  So we allow the user to define
+# variants of this variables for the GNU compilers separately.
+
+test $am_CC_is_GNU = yes && GNU_CFLAGS=${GNU_CFLAGS-$CFLAGS}
+AC_ARG_VAR([GNU_CFLAGS], [GNU C compiler flags])
+
+test $am_CXX_is_GNU = yes && GNU_CXXFLAGS=${GNU_CXXFLAGS-$CXXFLAGS}
+AC_ARG_VAR([GNU_CXXFLAGS], [GNU C++ compiler flags])
+
+test $am_F77_is_GNU = yes && GNU_FCFLAGS=${GNU_FCFLAGS-$FCFLAGS}
+AC_ARG_VAR([GNU_FCFLAGS], [GNU Fortran compiler flags])
+
+test $am_FC_is_GNU = yes && GNU_FFLAGS=${GNU_FFLAGS-$FFLAGS}
+AC_ARG_VAR([GNU_FFLAGS], [GNU Fortran 77 compiler flags])
+
+# If we have been able to find at least a working compiler above, we
+# know what the object and executable extensions for this platform are.
+OBJEXT=${ac_cv_objext-UNKNOWN}
+EXEEXT=${ac_cv_exeext-UNKNOWN}
+AC_SUBST([OBJEXT])
+AC_SUBST([EXEEXT])
+
+###########################################################################
+
 AC_CONFIG_FILES([
   Makefile
   contrib/Makefile
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 970ef75..91c1cab 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -19,4 +19,9 @@
 
 EXTRA_DIST = \
   check-html.am \
+  multilib/README \
+  multilib/config-ml.in \
+  multilib/symlink-tree \
+  multilib/multilib.am \
+  multilib/multi.m4 \
   README
diff --git a/contrib/multilib/README b/contrib/multilib/README
new file mode 100644
index 0000000..35c726f
--- /dev/null
+++ b/contrib/multilib/README
@@ -0,0 +1,9 @@
+Minimal support for multilib builds.
+
+For a little more information, see:
+<http://airs.com/ian/configure/configure_8.html>
+
+The master (and probably more up-to-date) copies of the 'config-ml.in'
+and 'symlink-tree' files are maintained in the GCC development tree
+at <http://gcc.gnu.org/svn.html>.  The same is probably true also for
+the 'multi.m4' file.
diff --git a/lib/config-ml.in b/contrib/multilib/config-ml.in
similarity index 100%
rename from lib/config-ml.in
rename to contrib/multilib/config-ml.in
diff --git a/m4/multi.m4 b/contrib/multilib/multi.m4
similarity index 89%
rename from m4/multi.m4
rename to contrib/multilib/multi.m4
index bc01dcf..9841767 100644
--- a/m4/multi.m4
+++ b/contrib/multilib/multi.m4
@@ -1,22 +1,20 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2011
+# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
+# serial 6
 
 # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
 # ---------------------------------------------------
 # Add --enable-multilib to configure.
 AC_DEFUN([AM_ENABLE_MULTILIB],
 [# Default to --enable-multilib
-AC_ARG_ENABLE([multilib],
-[AS_HELP_STRING(
-   [--enable-multilib],
-   [build many library versions (default)])],
+AC_ARG_ENABLE(multilib,
+[  --enable-multilib       build many library versions (default)],
 [case "$enableval" in
   yes) multilib=yes ;;
   no)  multilib=no ;;
@@ -37,7 +35,7 @@ if test "$srcdir" = "."; then
 else
   multi_basedir="$srcdir/$2"
 fi
-AC_SUBST([multi_basedir])
+AC_SUBST(multi_basedir)
 
 # Even if the default multilib is not a cross compilation,
 # it may be that some of the other multilibs are.
diff --git a/contrib/multilib/multilib.am b/contrib/multilib/multilib.am
new file mode 100644
index 0000000..d829d73
--- /dev/null
+++ b/contrib/multilib/multilib.am
@@ -0,0 +1,47 @@
+## automake - create Makefile.in from Makefile.am
+
+## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+## 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+## Foundation, Inc.
+## This Makefile.in is free software; the Free Software Foundation
+## gives unlimited permission to copy and/or distribute it,
+## with or without modifications, as long as this notice is preserved.
+
+## 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.
+
+MULTISRCTOP =
+MULTIBUILDTOP =
+MULTIDIRS =
+MULTISUBDIR =
+MULTIDO = true
+MULTICLEAN = true
+
+# GNU Make needs to see an explicit $(MAKE) variable in the command it
+# runs to enable its job server during parallel builds.  Hence the
+# comments below.
+all-multi:
+       $(MULTIDO) DO=all multi-do # $(MAKE)
+install-multi:
+       $(MULTIDO) DO=install multi-do # $(MAKE)
+mostlyclean-multi:
+       $(MULTICLEAN) DO=mostlyclean multi-clean # $(MAKE)
+clean-multi:
+       $(MULTICLEAN) DO=clean multi-clean # $(MAKE)
+distclean-multi:
+       $(MULTICLEAN) DO=distclean multi-clean # $(MAKE)
+maintainer-clean-multi:
+       $(MULTICLEAN) DO=maintainer-clean multi-clean # $(MAKE)
+
+.MAKE .PHONY: all-multi clean-multi distclean-multi install-am \
+             install-multi maintainer-clean-multi mostlyclean-multi
+
+install-exec-local: install-multi
+
+all-local: all-multi
+mostlyclean-local: mostlyclean-multi
+clean-local: clean-multi
+distclean-local: distclean-multi
+maintainer-clean-local: maintainer-clean-multi
diff --git a/lib/symlink-tree b/contrib/multilib/symlink-tree
similarity index 100%
rename from lib/symlink-tree
rename to contrib/multilib/symlink-tree
diff --git a/doc/automake.texi b/doc/automake.texi
index a73798f..f3a3532 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -354,7 +354,6 @@ Miscellaneous Rules
 
 * Tags::                        Interfacing to cscope, etags and mkid
 * Suffixes::                    Handling new file extensions
-* Multilibs::                   Support for multilibs.
 
 Conditionals
 
@@ -2293,11 +2292,6 @@ you are encouraged to fetch the latest versions of these 
files from
 @url{http://savannah.gnu.org/git/?group=config} before making a
 release.
 
address@hidden config-ml.in
-This file is not a program, it is a @file{configure} fragment used for
-multilib support (@pxref{Multilibs}).  This file is maintained in the
-GCC tree at @url{http://gcc.gnu.org/svn.html}.
-
 @item depcomp
 This program understands how to run a compiler so that it will
 generate not only the desired output but also dependency information
@@ -2334,12 +2328,6 @@ longer installed automatically, and it should be safe to 
remove it.
 @item py-compile
 This is used to byte-compile Python scripts.
 
address@hidden symlink-tree
-This program duplicates a tree of directories, using symbolic links
-instead of copying files.  Such an operation is performed when building
-multilibs (@pxref{Multilibs}).  This file is maintained in the GCC
-tree at @url{http://gcc.gnu.org/svn.html}.
-
 @item test-driver
 This implements the default test driver offered by the parallel
 testsuite harness.
@@ -3940,15 +3928,6 @@ Automake ships with several Autoconf macros that you can 
use from your
 
 @table @code
 
address@hidden AM_ENABLE_MULTILIB
address@hidden AM_ENABLE_MULTILIB
-This is used when a ``multilib'' library is being built.  The first
-optional argument is the name of the @file{Makefile} being generated; it
-defaults to @samp{Makefile}.  The second optional argument is used to find
-the top source directory; it defaults to the empty string (generally
-this should not be used unless you are familiar with the internals).
address@hidden
-
 @item AM_INIT_AUTOMAKE([OPTIONS])
 @itemx AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 @acindex AM_INIT_AUTOMAKE
@@ -10311,7 +10290,6 @@ There are a few rules and variables that didn't fit 
anywhere else.
 @menu
 * Tags::                        Interfacing to cscope, etags and mkid
 * Suffixes::                    Handling new file extensions
-* Multilibs::                   Support for multilibs.
 @end menu
 
 
@@ -10439,20 +10417,6 @@ Automake generate the suffix list for 
@code{.SUFFIXES}.  Any given
 @code{SUFFIXES} go at the start of the generated suffixes list, followed
 by Automake generated suffixes not already in the list.
 
address@hidden Multilibs
address@hidden Support for Multilibs
-
-Automake has support for an obscure feature called multilibs.  A
address@hidden is a library that is built for multiple different ABIs
-at a single time; each time the library is built with a different target
-flag combination.  This is only useful when the library is intended to
-be cross-compiled, and it is almost exclusively used for compiler
-support libraries.
-
-The multilib support is still experimental.  Only use it if you are
-familiar with multilibs and can debug problems you might encounter.
-
-
 @node Include
 @chapter Include
 
@@ -14232,7 +14196,7 @@ parentheses is the number of generated test cases.
 @c  LocalWords:  AUX var symlink deps Wno Wnone package's aclocal's distclean
 @c  LocalWords:  ltmain xref LIBSOURCE LIBSOURCES LIBOBJ MEMCMP vs RANLIB CXX
 @c  LocalWords:  LDFLAGS LIBTOOL libtool XTRA LIBS gettext's acdir APIVERSION
address@hidden  LocalWords:  dirlist noindent usr MULTILIB multilib Multilibs 
TIOCGWINSZ sc
address@hidden  LocalWords:  dirlist noindent usr TIOCGWINSZ sc
 @c  LocalWords:  GWINSZ termios SRCDIR tarball bzip LISPDIR lispdir XEmacs CCAS
 @c  LocalWords:  emacsen MicroEmacs CCASFLAGS UX GCJ gcj GCJFLAGS posix DMALLOC
 @c  LocalWords:  dmalloc ldmalloc REGEX regex DEPDIR DEP DEFUN aclocaldir fi
@@ -14264,7 +14228,7 @@ parentheses is the number of generated test cases.
 @c  LocalWords:  distdir distcheck distcleancheck listfiles distuninstallcheck
 @c  LocalWords:  VPATH tarfile stdout XFAIL DejaGnu dejagnu DEJATOOL runtest ln
 @c  LocalWords:  RUNTESTDEFAULTFLAGS toolchain RUNTESTFLAGS asis readme DVIPS
address@hidden  LocalWords:  installcheck gzipped tarZ std utils etags mkid 
multilibbing cd
address@hidden  LocalWords:  installcheck gzipped tarZ std utils etags mkid cd
 @c  LocalWords:  ARGS taggable ETAGSFLAGS lang ctags CTAGSFLAGS GTAGS gtags idl
 @c  LocalWords:  foocc doit idlC multilibs ABIs cmindex defmac ARG enableval FC
 @c  LocalWords:  MSG xtrue DBG pathchk CYGWIN afile proglink versioned CVS's TE
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index 6ce4a86..beead54 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -179,7 +179,7 @@ my %_ac_macro_for_var =
    CXX => 'AC_PROG_CXX',
    CXXFLAGS => 'AC_PROG_CXX',
    F77 => 'AC_PROG_F77',
-   F77FLAGS => 'AC_PROG_F77',
+   FFLAGS => 'AC_PROG_F77',
    FC => 'AC_PROG_FC',
    FCFLAGS => 'AC_PROG_FC',
    OBJC => 'AC_PROG_OBJC',
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 426c63d..2e6445b 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -20,7 +20,10 @@
 
 SUBDIRS = Automake am
 
-dist_pkgvdata_DATA = COPYING INSTALL texinfo.tex config-ml.in
+dist_pkgvdata_DATA = \
+  COPYING \
+  INSTALL \
+  texinfo.tex
 
 ## These must all be executable when installed.  However, if we use
 ## _SCRIPTS, then the program transform will be applied, which is not
@@ -38,7 +41,6 @@ dist_script_DATA = \
   depcomp \
   compile \
   py-compile \
-  symlink-tree \
   ar-lib \
   test-driver \
   tap-driver.sh \
diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am
index a174d20..251df05 100644
--- a/lib/am/Makefile.am
+++ b/lib/am/Makefile.am
@@ -46,7 +46,6 @@ ltlib.am \
 ltlibrary.am \
 mans-vars.am \
 mans.am \
-multilib.am \
 program.am \
 progs.am \
 python.am \
diff --git a/lib/am/multilib.am b/lib/am/multilib.am
deleted file mode 100644
index bfb1552..0000000
--- a/lib/am/multilib.am
+++ /dev/null
@@ -1,61 +0,0 @@
-## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1998, 2001, 2003, 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/>.
-## Multilib support variables.
-MULTISRCTOP =
-MULTIBUILDTOP =
-MULTIDIRS =
-MULTISUBDIR =
-MULTIDO = true
-MULTICLEAN = true
-
-# GNU Make needs to see an explicit $(MAKE) variable in the command it
-# runs to enable its job server during parallel builds.  Hence the
-# comments below.
-
-all-multi:
-       $(MULTIDO) DO=all multi-do # $(MAKE)
-install-multi:
-       $(MULTIDO) DO=install multi-do # $(MAKE)
-
-.MAKE .PHONY: all-multi install-multi
-
-
-mostlyclean-multi:
-       $(MULTICLEAN) DO=mostlyclean multi-clean # $(MAKE)
-clean-multi:
-       $(MULTICLEAN) DO=clean multi-clean # $(MAKE)
-distclean-multi:
-       $(MULTICLEAN) DO=distclean multi-clean # $(MAKE)
-maintainer-clean-multi:
-       $(MULTICLEAN) DO=maintainer-clean multi-clean # $(MAKE)
-
-.MAKE .PHONY: mostlyclean-multi clean-multi distclean-multi 
maintainer-clean-multi
-
-install-exec-am: install-multi
-## No uninstall rule?
-
-
-## These cleaning rules are recursive.  They should not be
-## registered as dependencies of *-am rules.  For instance
-## otherwise running `make clean' would cause both
-## clean-multi and mostlyclean-multi to be run, while only
-## clean-multi is really expected (since clean-multi recursively
-## call clean, it already do the job of mostlyclean).
-mostlyclean: mostlyclean-multi
-clean: clean-multi
-distclean: distclean-multi
-maintainer-clean: maintainer-clean-multi
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 3608511..3c5df60 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -40,7 +40,6 @@ maintainer.m4 \
 minuso.m4 \
 missing.m4 \
 mkdirp.m4 \
-multi.m4 \
 obsol-gt.m4 \
 obsol-lt.m4 \
 obsolete.m4 \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0ccbb45..dc16ad5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -138,6 +138,19 @@ do_subst = sed \
   -e 's|@address@hidden|$(PERL)|g' \
   -e 's|@address@hidden|$(EGREP)|g' \
   -e 's|@address@hidden|$(FGREP)|g' \
+  -e 's|@address@hidden|$(CPPFLAGS)|g' \
+  -e 's|@address@hidden|$(CC)|g' \
+  -e 's|@address@hidden|$(CFLAGS)|g' \
+  -e 's|@address@hidden|$(CXX)|g' \
+  -e 's|@address@hidden|$(CXXFLAGS)|g' \
+  -e 's|@address@hidden|$(F77)|g' \
+  -e 's|@address@hidden|$(FFLAGS)|g' \
+  -e 's|@address@hidden|$(FC)|g' \
+  -e 's|@address@hidden|$(FCFLAGS)|g' \
+  -e 's|@address@hidden|$(GNU_CFLAGS)|g' \
+  -e 's|@address@hidden|$(GNU_CXXFLAGS)|g' \
+  -e 's|@address@hidden|$(GNU_FFLAGS)|g' \
+  -e 's|@address@hidden|$(GNU_FCFLAGS)|g' \
   -e 's|@address@hidden|$(TEX)|g' \
   -e 's|@address@hidden|$(MODIFICATION_DELAY)|g' \
   -e 's|@address@hidden|$(am_AUTOCONF)|g' \
diff --git a/tests/README b/tests/README
index f593eab..02b14e3 100644
--- a/tests/README
+++ b/tests/README
@@ -28,17 +28,18 @@ Running the tests
 
     make -k check TESTS="foo.test bar.test"
 
- To run the tests in cross-compilation mode:
-
-    make -k check host_alias="$host_alias"
-
- Here `$host_alias' should be defined to a proper value different from
- configure-determined `$build_alias', and should refer to a set of
- cross-compilers you have available on your system; for example, if
- on Linux you have a set of MinGW-targeted cross-compilers named
- 'i586-mingw32msvc-cc', 'i586-mingw32msvc-c++', etc., you could use:
-
-   make -k check host_alias='i586-mingw32msvc'
+ To run the tests in cross-compilation mode, you should first configure
+ the automake source tree to a cross-compilation setup.  For example, to
+ run with a Linux-to-MinGW cross compiler, you will need something like
+ this:
+
+   ./configure --host i586-mingw32msvc --build i686-pc-linux-gnu
+
+ To avoid possible spurious error, you really have to *explicitly* specify
+ `--build' in addition to `--host'; the `lib/config.guess' script can help
+ determine the correct value to pass to `--build'.
+ Then you can just run the testsuite in the usual way, and the test cases
+ using a compiler should automatically use a cross-compilation setup.
 
 
 Interpretation
diff --git a/tests/aclocal-install-absdir.test 
b/tests/aclocal-install-absdir.test
index 1a642b5..64d9b62 100755
--- a/tests/aclocal-install-absdir.test
+++ b/tests/aclocal-install-absdir.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# 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
@@ -21,8 +21,6 @@
 
 . ./defs || Exit 1
 
-set -e
-
 mkdir loc sys
 
 echo 'AM_DUMMY_MACRO' >> configure.in
diff --git a/tests/ccnoco.test b/tests/ccnoco.test
index bcd18fc..780ffe6 100755
--- a/tests/ccnoco.test
+++ b/tests/ccnoco.test
@@ -59,10 +59,6 @@ END
 
 chmod +x Mycomp
 
-# Ignore user CFLAGS.
-CFLAGS=
-export CFLAGS
-
 # Make sure the compiler doesn't understand `-c -o'
 CC=`pwd`/Mycomp
 export CC
diff --git a/tests/ccnoco3.test b/tests/ccnoco3.test
index 2a32f6b..82fb320 100755
--- a/tests/ccnoco3.test
+++ b/tests/ccnoco3.test
@@ -59,10 +59,6 @@ END
 
 chmod +x Mycomp
 
-# Ignore user CFLAGS.
-CFLAGS=
-export CFLAGS
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
diff --git a/tests/defs b/tests/defs
index 67e45ad..7d285a2 100644
--- a/tests/defs
+++ b/tests/defs
@@ -234,6 +234,13 @@ unset am_funcs_file
 # tests (or portions of them) that requires a native compiler.
 cross_compiling ()
 {
+  # Quoting from the autoconf manual:
+  #   ... [$host_alias and $build both] default to the result of running
+  #   config.guess, unless you specify either --build or --host.  In
+  #   this case, the default becomes the system type you specified.
+  #   If you specify both, *and they're different*, configure enters
+  #   cross compilation mode (so it doesn't run any tests that require
+  #   execution).
   test x"$host_alias" != x && test x"$build_alias" != x"$host_alias"
 }
 
@@ -551,6 +558,56 @@ fetch_tap_driver ()
 # use the perl implementation by default for the moment.
 am_tap_implementation=${am_tap_implementation-shell}
 
+# Usage: require_compiler_ {cc|c++|fortran|fortran77}
+require_compiler_ ()
+{
+  case $# in
+    0) fatal_ "require_compiler_: missing argument";;
+    1) ;;
+    *) fatal_ "require_compiler_: too many arguments";;
+  esac
+  case $1 in
+    cc)
+      am__comp_lang="C"
+      am__comp_var=CC
+      am__comp_flag_vars='CFLAGS CPPFLAGS'
+      ;;
+    c++)
+      am__comp_lang="C++"
+      am__comp_var=CXX
+      am__comp_flag_vars='CXXFLAGS CPPFLAGS'
+      ;;
+    fortran)
+      am__comp_lang="Fortran"
+      am__comp_var=FC
+      am__comp_flag_vars='FCFLAGS'
+      ;;
+    fortran77)
+      am__comp_lang="Fortran 77"
+      am__comp_var=F77
+      am__comp_flag_vars='FFLAGS'
+      ;;
+  esac
+  shift
+  eval "am__comp_prog=\${$am__comp_var}" \
+    || fatal_ "expanding \${$am__comp_var} in require_compiler_"
+  case $am__comp_prog in
+    "")
+      fatal_ "botched configuration: \$$am__comp_var is empty";;
+    false)
+      skip_all_ "no $am__comp_lang compiler available";;
+    autodetect|autodetected)
+      # Let the ./configure commands in the test script try to determine
+      # these automatically.
+      unset $am__comp_var $am__comp_flag_vars;;
+    *)
+      # Pre-set these for the ./configure commands in the test script.
+      export $am__comp_var $am__comp_flag_vars;;
+  esac
+  # Delete private variables.
+  unset am__comp_lang am__comp_prog am__comp_var am__comp_flag_vars
+}
+
 ## ----------------------------------------------------------- ##
 ##  Checks for required tools, and additional setups (if any)  ##
 ##  required by them.                                          ##
@@ -571,14 +628,8 @@ do
   # Check that each required tool is present.
   case $tool in
     :) ;;
-    cc)
-      test "$CC"  = false && skip_all_ "no C compiler available";;
-    c++)
-      test "$CXX" = false && skip_all_ "no C++ compiler available";;
-    fortran)
-      test "$FC"  = false && skip_all_ "no Fortran compiler available";;
-    fortran77)
-      test "$F77" = false && skip_all_ "no Fortran 77 compiler available";;
+    cc|c++|fortran|fortran77)
+      require_compiler_ $tool;;
     xsi-shell)
       require_xsi "$SHELL";;
     xsi-bin-sh)
@@ -598,7 +649,11 @@ do
       ;;
     cl)
       CC=cl
-      export CC
+      # Don't export CFLAGS, as that could have been initialized to only
+      # work with the C compiler detected at configure time.  If the user
+      # wants CFLAGS to also influence `cl', he can still export CFLAGS
+      # in the environment "by hand" before calling the testsuite.
+      export CC CPPFLAGS
       echo "$me: running $CC -?"
       $CC -? || skip_all_ "Microsoft C compiler \`$CC' not available"
       ;;
@@ -623,7 +678,8 @@ do
       # has defined CC in his environment, otherwise ./configure will
       # prefer gcc to other compilers.
       CC=${am__tool_prefix}gcc
-      export CC
+      CFLAGS=$GNU_CFLAGS
+      export CC CFLAGS CPPFLAGS
       echo "$me: running $CC --version"
       $CC --version || skip_all_ "GNU C compiler not available"
       echo "$me: running $CC -v"
@@ -639,7 +695,8 @@ do
       ;;
     g++)
       CXX=${am__tool_prefix}g++
-      export CXX
+      CXXFLAGS=$GNU_CXXFLAGS
+      export CXX CXXFLAGS CPPFLAGS
       echo "$me: running $CXX --version"
       $CXX --version || skip_all_ "GNU C++ compiler not available"
       echo "$me: running $CXX -v"
@@ -647,31 +704,33 @@ do
       ;;
     gfortran)
       FC=${am__tool_prefix}gfortran
-      export FC
+      FCFLAGS=$GNU_FCFLAGS
+      export FC FCFLAGS
       echo "$me: running $FC --version"
       $FC --version || skip_all_ "GNU Fortran compiler not available"
       echo "$me: running $FC -v"
       $FC -v || skip_all_ "botched installation for GNU Fortran compiler"
       case " $required " in
         *\ g77\ *) ;;
-        *) F77=$FC; export F77;;
+        *) F77=$FC FFLAGS=$FCFLAGS; export F77 FFLAGS;;
       esac
       ;;
     g77)
       F77=${am__tool_prefix}g77
-      export F77
+      FFLAGS=$GNU_FFLAGS
+      export F77 FFLAGS
       echo "$me: running $F77 --version"
       $F77 --version || skip_all_ "GNU Fortran 77 compiler not available"
       echo "$me: running $F77 -v"
       $F77 -v || skip_all_ "botched installation for GNU Fortran 77 compiler"
       case " $required " in
         *\ gfortran\ *) ;;
-        *) FC=$F77; export FC;;
+        *) FC=$F77 FCFLAGS=$FFLAGS; export FC FCFLAGS;;
       esac
       ;;
     icc)
       CC=icc
-      export CC
+      export CC CPPFLAGS # But not CFLAGS (see comments for `cl' above).
       # There is no way to ask *only* the compiler's version.
       # This tool always wants to do something (by default
       # it will try link *nothing* and complain it cannot find
diff --git a/tests/defs-static.in b/tests/defs-static.in
index 2bae9c1..b79e399 100644
--- a/tests/defs-static.in
+++ b/tests/defs-static.in
@@ -194,6 +194,24 @@ AUTORECONF="$AUTORECONF -B /no/such/dir"
 EGREP=${AM_TESTSUITE_EGREP-'@EGREP@'}
 FGREP=${AM_TESTSUITE_FGREP-'@FGREP@'}
 
+# Compilers and their flags.  These can point to non-GNU compilers (and
+# on non-Linux and non-BSD systems, they probably will).
+CC=${AM_TESTSUITE_CC-${CC-'@CC@'}}
+CXX=${AM_TESTSUITE_CXX-${CXX-'@CXX@'}}
+F77=${AM_TESTSUITE_F77-${F77-'@F77@'}}
+FC=${AM_TESTSUITE_FC-${FC-'@FC@'}}
+CFLAGS=${AM_TESTSUITE_CFLAGS-${CFLAGS-'@CFLAGS@'}}
+CXXFLAGS=${AM_TESTSUITE_CXXFLAGS-${CXXFLAGS-'@CXXFLAGS@'}}
+FCFLAGS=${AM_TESTSUITE_FCFLAGS-${FCFLAGS-'@FCFLAGS@'}}
+FFLAGS=${AM_TESTSUITE_FFLAGS-${FFLAGS-'@FFLAGS@'}}
+CPPFLAGS=${AM_TESTSUITE_CPPFLAGS-${CPPFLAGS-'@CPPFLAGS@'}}
+
+# Flags for the GNU compilers.
+GNU_FFLAGS=${AM_TESTSUITE_GNU_FFLAGS-${GNU_FFLAGS-'@GNU_FFLAGS@'}}
+GNU_FCFLAGS=${AM_TESTSUITE_GNU_FCFLAGS-${GNU_FCFLAGS-'@GNU_FCFLAGS@'}}
+GNU_CXXFLAGS=${AM_TESTSUITE_GNU_CXXFLAGS-${GNU_CXXFLAGS-'@GNU_CXXFLAGS@'}}
+GNU_CFLAGS=${AM_TESTSUITE_GNU_CFLAGS-${GNU_CFLAGS-'@GNU_CFLAGS@'}}
+
 # No all versions of Tex support `--version', so we use a configure
 # check to decide if tex is available.  This decision is embodied in
 # this variable.
diff --git a/tests/dist-formats.tap b/tests/dist-formats.tap
index 34399bc..dd9d896 100755
--- a/tests/dist-formats.tap
+++ b/tests/dist-formats.tap
@@ -75,12 +75,10 @@ all_compressors=`
   done | tr "$nl" ' '`
 echo All compressors: $all_compressors
 
-# Assume gzip(1) and compress(1) are available on every reasonable
-# portability target.
+# Assume gzip(1) is available on every reasonable portability target.
 missing_compressors=`
   for c in $all_compressors; do
-    test $c = compress || test $c = gzip || $c --version </dev/null >&2 \
-      && continue
+    test $c = gzip || $c --version </dev/null >&2 && continue
     echo $c
   done | tr "$nl" ' '`
 echo Missing compressors: $missing_compressors
@@ -147,7 +145,7 @@ can_compress ()
 
   command_ok_if_have_compressor "'make dist-$format' work by default" \
     eval '
-      rm -f *$tarname* \
+      rm -rf *$tarname* \
         && make dist-$format \
         && test -f $tarname-1.0.$suffix \
         && ls -l *$tarname* \
@@ -170,7 +168,7 @@ command_ok_ "default [make distcheck]"  $MAKE distcheck
 command_ok_ "'make dist' only builds *.tar.gz by default" \
             test "`ls *defaults*`" = defaults-1.0.tar.gz
 
-rm -f *defaults*
+rm -rf *defaults*
 
 for fmt in $all_compression_formats; do
   can_compress defaults $fmt
@@ -249,7 +247,7 @@ END
   command_ok_ "$desc [configure]" ./configure
   command_ok_ "$desc [ark-name]" $MAKE check-ark-name
   command_ok_if_have_compressor "$desc [distcheck]" $MAKE distcheck
-  command_ok_if_have_compressor "$desc [distcheck]" $MAKE check-ark-exists
+  command_ok_if_have_compressor "$desc [ark-exists]" $MAKE check-ark-exists
   command_ok_ "$desc [no .tar.gz]"  $MAKE check-no-tar-gz
 
   unset desc
@@ -310,6 +308,7 @@ check_tarball ()
 command_ok_ "$desc [automake]" $AUTOMAKE
 
 skip_reason=
+have_compressor compress || skip_reason="'compress' not available"
 have_compressor bzip2 || skip_reason="'bzip2' not available"
 if test "$MAKE_j4" = false; then
   test -z "$skip_reason" || skip_reason="$skip_reason and "
diff --git a/tests/distcheck-pr10470.test b/tests/distcheck-pr10470.test
index d3e4839..5e90d0a 100755
--- a/tests/distcheck-pr10470.test
+++ b/tests/distcheck-pr10470.test
@@ -22,8 +22,6 @@
 am_parallel_tests=no
 . ./defs || Exit 1
 
-set -e
-
 mkdir foo.d
 sh -c "cd foo.d && sleep '4'" &
 # Without this sleep, the "rm -rf foo.d" below would reliably beat
diff --git a/tests/help-multilib.test b/tests/help-multilib.test
index d4df64d..6c31cde 100755
--- a/tests/help-multilib.test
+++ b/tests/help-multilib.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2010, 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
@@ -16,6 +16,8 @@
 
 # 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
 
@@ -24,7 +26,7 @@ AC_INIT([$me], [1.0])
 AM_ENABLE_MULTILIB
 END
 
-$ACLOCAL
+cat "$top_testsrcdir"/contrib/multilib/multi.m4 > aclocal.m4
 $AUTOCONF
 
 grep_configure_help --enable-multilib ' many library versions \(default\)'
diff --git a/tests/lzma.test b/tests/lzma.test
index 28b4198..f0c284b 100755
--- a/tests/lzma.test
+++ b/tests/lzma.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2007, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2007, 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
@@ -33,7 +33,8 @@ AC_OUTPUT
 END
 : > Makefile.am
 
-$ACLOCAL --force
+rm -rf autom4te*.cache
+$ACLOCAL
 AUTOMAKE_fails -Wnone -Wno-error
 grep "^configure\\.in:2:.*$errmsg" stderr
 
diff --git a/tests/multlib.test b/tests/multlib.test
index 0c418be..c5c508b 100755
--- a/tests/multlib.test
+++ b/tests/multlib.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2007, 2010, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 2003, 2004, 2007, 2010, 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
@@ -17,10 +17,20 @@
 
 # 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
 . ./defs || Exit 1
 
+mldir=$top_testsrcdir/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.in <<'END'
 AC_INIT([multlib], [1.0])
 AC_CONFIG_SRCDIR(libfoo/foo.c)
@@ -49,12 +59,18 @@ PATH=`pwd`$PATH_SEPARATOR$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.in <<'END'
 AC_PREREQ(2.57)
@@ -75,11 +91,13 @@ 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.in <<'END'
 AC_PREREQ(2.57)
@@ -100,35 +118,38 @@ 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
-
-: >libbar/sub/Makefile.am
-
+echo 'include $(top_srcdir)/multilib.am' >libbar/sub/Makefile.am
 : > libbar/bar.c
 
-cp "$am_scriptdir"/config-ml.in "$am_scriptdir"/symlink-tree .
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
+
 cd libfoo
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
-cd ../libbar
+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
 
@@ -136,4 +157,7 @@ $MAKE distcleancheck
 cd ..
 # Why to I have to specify --with-target-subdir?
 ./configure --enable-multilib --with-target-subdir=. CC=mycc
-$MAKE
+$MAKE check
+DISTCHECK_CONFIGURE_FLAGS='--enable-multilib CC=mycc' $MAKE distcheck
+
+:
diff --git a/tests/objext-pr10128.test b/tests/objext-pr10128.test
index 0692164..120986c 100755
--- a/tests/objext-pr10128.test
+++ b/tests/objext-pr10128.test
@@ -19,8 +19,6 @@
 
 . ./defs || Exit 1
 
-set -e
-
 echo AC_OUTPUT >> configure.in
 
 cat > Makefile.am <<'END'
diff --git a/tests/parallel-tests-dry-run-1.test 
b/tests/parallel-tests-dry-run-1.test
index b0f94e5..4ed59f0 100755
--- a/tests/parallel-tests-dry-run-1.test
+++ b/tests/parallel-tests-dry-run-1.test
@@ -20,8 +20,6 @@
 am_parallel_tests=yes
 . ./defs || Exit 1
 
-set -e
-
 echo AC_OUTPUT >> configure.in
 
 cat > Makefile.am <<'END'
diff --git a/tests/parallel-tests-fd-redirect.test 
b/tests/parallel-tests-fd-redirect.test
index 73a134e..8b16378 100755
--- a/tests/parallel-tests-fd-redirect.test
+++ b/tests/parallel-tests-fd-redirect.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# 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
@@ -65,20 +65,26 @@ END
 chmod a+x foo.sh bar
 
 cat > baz.c <<'END'
+#include <stdio.h>
 #include <unistd.h>
 int main (void)
 {
-  write (9, " bazbazbaz\n", 11);
-  return 0;
+  ssize_t res = write (9, " bazbazbaz\n", 11);
+  if (res < 0)
+    perror("write failed");
+  return res != 11;
 }
 END
 
 cat > zardoz.c <<'END'
+#include <stdio.h>
 #include <unistd.h>
 int main (void)
 {
-  write (9, " quxquxqux\n", 11);
-  return 0;
+  ssize_t res = write (9, " quxquxqux\n", 11);
+  if (res < 0)
+    perror("write failed");
+  return res != 11;
 }
 END
 
diff --git a/tests/tar-override.test b/tests/tar-override.test
index b08c9f8..3dd4180 100755
--- a/tests/tar-override.test
+++ b/tests/tar-override.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# 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
@@ -21,8 +21,6 @@
 
 . ./defs || Exit 1
 
-set -e
-
 cwd=`pwd` || fatal_ "couldn't get current working directory"
 
 echo AC_OUTPUT >> configure.in
diff --git a/tests/vala-mix.test b/tests/vala-mix.test
index ba2f108..82d305a 100755
--- a/tests/vala-mix.test
+++ b/tests/vala-mix.test
@@ -16,11 +16,9 @@
 
 # Vala sources and C sources in the same program.  Functional test.
 
-required=cc
+required='valac cc'
 . ./defs || Exit 1
 
-set -e
-
 cat >> configure.in <<'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
@@ -96,8 +94,9 @@ have_generated_files ()
 # C files.
 have_generated_files
 
+# Remake rules are not uselessly triggered.
 $MAKE -q
-$MAKE -n | grep stamp && Exit 1
+$MAKE -n | $FGREP vala.stamp && Exit 1
 
 # Check the distribution.
 $MAKE distcheck
diff --git a/tests/vala-vpath.test b/tests/vala-vpath.test
index 04c1aa1..89d951d 100755
--- a/tests/vala-vpath.test
+++ b/tests/vala-vpath.test
@@ -20,8 +20,6 @@
 required=valac
 . ./defs || Exit 1
 
-set -e
-
 cat >> configure.in << 'END'
 AC_CONFIG_SRCDIR([hello.vala])
 AC_PROG_CC
diff --git a/tests/vala.test b/tests/vala.test
index e1d2676..d027a6d 100755
--- a/tests/vala.test
+++ b/tests/vala.test
@@ -79,4 +79,9 @@ $FGREP 'baz.c' sub/Makefile.in
 $FGREP 'foo_vala.stamp:' sub/Makefile.in
 test `$FGREP -c '.stamp:' sub/Makefile.in` -eq 1
 
+# Check against regression for weird bug due to unescaped '@'
+# characters used in a "..." perl string when writing the vala
+# rules from automake.in.
+grep '\$[0-9][0-9]*t' Makefile.in sub/Makefile.in && Exit 1
+
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]