Merge branch 'compilers-for-testsuite'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 23 Jan 2012 08:57:23 +0000 (09:57 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 23 Jan 2012 08:57:23 +0000 (09:57 +0100)
* compilers-for-testsuite:
  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

28 files changed:
Makefile.am
NEWS
aclocal.in
automake.in
contrib/Makefile.am
contrib/multilib/multi.m4 [new file with mode: 0644]
doc/automake.texi
lib/Automake/Getopt.pm [new file with mode: 0644]
lib/Automake/Makefile.am
lib/Automake/Variable.pm
m4/multi.m4
tests/Makefile.am
tests/aclocal-install-absdir.test
tests/defs
tests/dist-formats.tap
tests/distcheck-pr10470.test
tests/getopt.test [deleted file]
tests/list-of-tests.mk
tests/lzma.test
tests/multlib.test
tests/objext-pr10128.test
tests/parallel-tests-dry-run-1.test [moved from tests/parallel-tests-dryrun.test with 96% similarity]
tests/parallel-tests-dry-run-2.test [moved from tests/parallel-tests-dry-run.test with 93% similarity]
tests/silent-nested-vars.test
tests/tar-override.test
tests/vala-mix.test
tests/vala-vpath.test
tests/vala.test

index fc37ef1..c4234a1 100644 (file)
@@ -465,7 +465,8 @@ sc_AMDEP_TRUE_in_automake_in:
          exit 1; \
        fi
 
-## Tests should never call make directly.
+## Recursive make invocations should always pass $(AM_MAKEFLAGS)
+## to $(MAKE), for portability to non-GNU make.
 sc_tests_make_without_am_makeflags:
        @if grep '^[^#].*(MAKE) ' $(srcdir)/lib/am/*.am $(srcdir)/automake.in |\
                grep -v 'AM_MAKEFLAGS'; then \
@@ -865,18 +866,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.
@@ -890,9 +888,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..03ad438 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,10 @@ New in 1.11a:
     remains available in the 'contrib/' directory of the Automake
     distribution).
 
+  - The support for the "obscure" multilib feature has been deprecated,
+    and will be moved out of the automake core in the next major Automake
+    release (1.12).
+
   - The deprecated `lzma' compression format for distribution archives
     has been removed, in favor of `xz' and `lzip'.
 
@@ -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
index 93ed5eb..8cffe71 100644 (file)
@@ -944,6 +944,8 @@ sub parse_arguments ()
 
   my %cli_options =
     (
+     'help'            => sub { usage(0); },
+     'version'         => \&version,
      'acdir=s'         => \&handle_acdir_option,
      'system-acdir=s'  => sub { shift; @system_includes = @_; },
      'automake-acdir=s'        => sub { shift; @automake_includes = @_; },
@@ -957,55 +959,9 @@ sub parse_arguments ()
      'verbose'         => sub { setup_channel 'verb', silent => 0; },
      'W|warnings=s'     => \&parse_warnings,
      );
-  use Getopt::Long;
-  Getopt::Long::config ("bundling", "pass_through");
-
-  # See if --version or --help is used.  We want to process these before
-  # anything else because the GNU Coding Standards require us to
-  # `exit 0' after processing these options, and we can't guarantee this
-  # if we treat other options first.  (Handling other options first
-  # could produce error diagnostics, and in this condition it is
-  # confusing if aclocal does `exit 0'.)
-  my %cli_options_1st_pass =
-    (
-     'version' => \&version,
-     'help'    => sub { usage(0); },
-     # Recognize all other options (and their arguments) but do nothing.
-     map { $_ => sub {} } (keys %cli_options)
-     );
-  my @ARGV_backup = @ARGV;
-  Getopt::Long::GetOptions %cli_options_1st_pass
-    or exit 1;
-  @ARGV = @ARGV_backup;
-
-  # Now *really* process the options.  This time we know that --help
-  # and --version are not present, but we specify them nonetheless so
-  # that ambiguous abbreviation are diagnosed.
-  Getopt::Long::GetOptions %cli_options, 'version' => sub {}, 'help' => sub {}
-    or exit 1;
-
-  if (@ARGV)
-    {
-      my %argopts;
-      for my $k (keys %cli_options)
-       {
-         if ($k =~ /(.*)=s$/)
-           {
-             map { $argopts{(length ($_) == 1)
-                            ? "-$_" : "--$_" } = 1; } (split (/\|/, $1));
-           }
-       }
-      if (exists $argopts{$ARGV[0]})
-       {
-         fatal ("option `$ARGV[0]' requires an argument.\n"
-                . "Try `$0 --help' for more information");
-       }
-      else
-       {
-         fatal ("unrecognized option `$ARGV[0]'\n"
-                . "Try `$0 --help' for more information");
-       }
-    }
+
+  use Automake::Getopt ();
+  Automake::Getopt::parse_options %cli_options;
 
   if ($print_and_exit)
     {
index bf9f0c0..160210c 100644 (file)
@@ -5907,9 +5907,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 > \$@-t\n".
+    "\t${silent}rm -f \$\@ && echo stamp > \$\@-t\n".
     "\t${verbose}\$(am__cd) \$(srcdir) && ${compile} \$(${derived}_SOURCES)\n".
-    "\t${silent}mv -f \$@-t \$@\n";
+    "\t${silent}mv -f \$\@-t \$\@\n";
 
   push_dist_common ("${derived}_vala.stamp");
 
@@ -8331,6 +8331,8 @@ sub parse_arguments ()
 
   my %cli_options =
     (
+     'version' => \&version,
+     'help'    => \&usage,
      'libdir=s'        => \$libdir,
      'gnu'             => sub { $strict = 'gnu'; },
      'gnits'           => sub { $strict = 'gnits'; },
@@ -8345,32 +8347,9 @@ sub parse_arguments ()
      'v|verbose'       => sub { setup_channel 'verb', silent => 0; },
      'W|warnings=s'     => \@warnings,
      );
-  use Getopt::Long;
-  Getopt::Long::config ("bundling", "pass_through");
-
-  # See if --version or --help is used.  We want to process these before
-  # anything else because the GNU Coding Standards require us to
-  # `exit 0' after processing these options, and we can't guarantee this
-  # if we treat other options first.  (Handling other options first
-  # could produce error diagnostics, and in this condition it is
-  # confusing if Automake does `exit 0'.)
-  my %cli_options_1st_pass =
-    (
-     'version' => \&version,
-     'help'    => \&usage,
-     # Recognize all other options (and their arguments) but do nothing.
-     map { $_ => sub {} } (keys %cli_options)
-     );
-  my @ARGV_backup = @ARGV;
-  Getopt::Long::GetOptions %cli_options_1st_pass
-    or exit 1;
-  @ARGV = @ARGV_backup;
 
-  # Now *really* process the options.  This time we know that --help
-  # and --version are not present, but we specify them nonetheless so
-  # that ambiguous abbreviation are diagnosed.
-  Getopt::Long::GetOptions %cli_options, 'version' => sub {}, 'help' => sub {}
-    or exit 1;
+  use Automake::Getopt ();
+  Automake::Getopt::parse_options %cli_options;
 
   set_strictness ($strict);
   my $cli_where = new Automake::Location;
@@ -8383,33 +8362,6 @@ sub parse_arguments ()
 
   return unless @ARGV;
 
-  if ($ARGV[0] =~ /^-./)
-    {
-      my %argopts;
-      for my $k (keys %cli_options)
-       {
-         if ($k =~ /(.*)=s$/)
-           {
-             map { $argopts{(length ($_) == 1)
-                            ? "-$_" : "--$_" } = 1; } (split (/\|/, $1));
-           }
-       }
-      if ($ARGV[0] eq '--')
-       {
-         shift @ARGV;
-       }
-      elsif (exists $argopts{$ARGV[0]})
-       {
-         fatal ("option `$ARGV[0]' requires an argument.\n"
-                . "Try `$0 --help' for more information");
-       }
-      else
-       {
-         fatal ("unrecognized option `$ARGV[0]'.\n"
-                . "Try `$0 --help' for more information");
-       }
-    }
-
   my $errspec = 0;
   foreach my $arg (@ARGV)
     {
index 970ef75..ce1d699 100644 (file)
@@ -19,4 +19,5 @@
 
 EXTRA_DIST = \
   check-html.am \
+  multilib/multi.m4 \
   README
diff --git a/contrib/multilib/multi.m4 b/contrib/multilib/multi.m4
new file mode 100644 (file)
index 0000000..9841767
--- /dev/null
@@ -0,0 +1,65 @@
+##                                                          -*- Autoconf -*-
+# 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 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,
+[  --enable-multilib       build many library versions (default)],
+[case "$enableval" in
+  yes) multilib=yes ;;
+  no)  multilib=no ;;
+  *)   AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
+ esac],
+             [multilib=yes])
+
+# We may get other options which we leave undocumented:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+# See config-ml.in if you want the gory details.
+
+if test "$srcdir" = "."; then
+  if test "$with_target_subdir" != "."; then
+    multi_basedir="$srcdir/$with_multisrctop../$2"
+  else
+    multi_basedir="$srcdir/$with_multisrctop$2"
+  fi
+else
+  multi_basedir="$srcdir/$2"
+fi
+AC_SUBST(multi_basedir)
+
+# Even if the default multilib is not a cross compilation,
+# it may be that some of the other multilibs are.
+if test $cross_compiling = no && test $multilib = yes \
+   && test "x${with_multisubdir}" != x ; then
+   cross_compiling=maybe
+fi
+
+AC_OUTPUT_COMMANDS([
+# Only add multilib support code if we just rebuilt the top-level
+# Makefile.
+case " $CONFIG_FILES " in
+ *" ]m4_default([$1],Makefile)[ "*)
+   ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
+   ;;
+esac],
+                  [
+srcdir="$srcdir"
+host="$host"
+target="$target"
+with_multisubdir="$with_multisubdir"
+with_multisrctop="$with_multisrctop"
+with_target_subdir="$with_target_subdir"
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+multi_basedir="$multi_basedir"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+CC="$CC"])])dnl
index 6be7ac3..0cdeb7b 100644 (file)
@@ -354,7 +354,7 @@ Miscellaneous Rules
 
 * Tags::                        Interfacing to cscope, etags and mkid
 * Suffixes::                    Handling new file extensions
-* Multilibs::                   Support for multilibs.
+* Multilibs::                   Support for multilibs (deprecated, soon to be removed).
 
 Conditionals
 
@@ -2305,8 +2305,11 @@ release.
 
 @item 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}.
+multilib support (@pxref{Multilibs}).  Since the Automake multilib
+support has been @emph{deprecated} and targeted for removal, this
+file is going to be @emph{removed from the Automake core} in the next
+major release.  The master copy of 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
@@ -2347,8 +2350,11 @@ This is used to byte-compile Python scripts.
 @item 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}.
+multilibs (@pxref{Multilibs}).  Since the Automake multilib support has
+been @emph{deprecated} and targeted for removal, this file is going to
+be @emph{removed from the Automake core} in the next major release.
+The master copy of 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
@@ -3954,12 +3960,18 @@ Automake ships with several Autoconf macros that you can use from your
 
 @item AM_ENABLE_MULTILIB
 @acindex 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).
-@xref{Multilibs}.
+
+This is used when a ``multilib'' library is being built.  Please be
+aware that multilib support @emph{will be removed} from the Automake
+core in the next major release, and then @emph{this macro will go away
+as well} (even if a ``frozen'' version of will remain available in the
+@file{contrib/} directory of the Automake distribution).
+
+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).  @xref{Multilibs}.
 
 @item AM_INIT_AUTOMAKE([OPTIONS])
 @itemx AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
@@ -10332,7 +10344,7 @@ 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.
+* Multilibs::   Support for multilibs (deprecated, soon to be removed).
 @end menu
 
 
@@ -10461,19 +10473,21 @@ Automake generate the suffix list for @code{.SUFFIXES}.  Any given
 by Automake generated suffixes not already in the list.
 
 @node Multilibs
-@section Support for Multilibs
+@section Support for Multilibs (deprecated, soon to be removed).
 
-Automake has support for an obscure feature called multilibs.  A
-@dfn{multilib} is a library that is built for multiple different ABIs
+Automake used to support an obscure feature called multilibs.  @emph{This
+feature is now deprecated, and will be removed in the next major Automake
+version}.  Still, its implementation will remain available in the
+@file{contrib/} directory of the Automake distribution, so it should be
+very easy for motivated users to continue to use it in their projects,
+if they really need to.
+
+A @dfn{multilib} 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
 
diff --git a/lib/Automake/Getopt.pm b/lib/Automake/Getopt.pm
new file mode 100644 (file)
index 0000000..84cee5e
--- /dev/null
@@ -0,0 +1,115 @@
+# 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 3 of the License, 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/>.
+
+package Automake::Getopt;
+
+=head1 NAME
+
+Automake::Getopt - GCS conforming parser for command line options
+
+=head1 SYNOPSIS
+
+  use Automake::Getopt;
+
+=head1 DESCRIPTION
+
+Export a function C<parse_options>, performing parsing of command
+line options in conformance to the GNU Coding standards.
+
+=cut
+
+use 5.006_002;
+use strict;
+use warnings FATAL => 'all';
+use Exporter ();
+use Getopt::Long ();
+use Automake::ChannelDefs qw/fatal/;
+use Carp qw/croak confess/;
+
+use vars qw (@ISA @EXPORT);
+@ISA = qw (Exporter);
+@EXPORT= qw/getopt/;
+
+=item C<parse_options (%option)>
+
+Wrapper around C<Getopt::Long>, trying to conform to the GNU
+Coding Standards for error messages.
+
+=cut
+
+sub parse_options (%)
+{
+  my %option = @_;
+
+  Getopt::Long::Configure ("bundling", "pass_through");
+  # Unrecognized options are passed through, so GetOption can only fail
+  # due to internal errors or misuse of options specification.
+  Getopt::Long::GetOptions (%option)
+    or confess "error in options specification (likely)";
+
+  if (@ARGV && $ARGV[0] =~ /^-./)
+    {
+      my %argopts;
+      for my $k (keys %option)
+       {
+         if ($k =~ /(.*)=s$/)
+           {
+             map { $argopts{(length ($_) == 1)
+                            ? "-$_" : "--$_" } = 1; } (split (/\|/, $1));
+           }
+       }
+      if ($ARGV[0] eq '--')
+       {
+         shift @ARGV;
+       }
+      elsif (exists $argopts{$ARGV[0]})
+       {
+         fatal ("option `$ARGV[0]' requires an argument\n"
+                . "Try `$0 --help' for more information.");
+       }
+      else
+       {
+         fatal ("unrecognized option `$ARGV[0]'.\n"
+                . "Try `$0 --help' for more information.");
+       }
+    }
+}
+
+=back
+
+=head1 SEE ALSO
+
+L<Getopt::Long>
+
+=cut
+
+1; # for require
+
+### Setup "GNU" style for perl-mode and cperl-mode.
+## Local Variables:
+## perl-indent-level: 2
+## perl-continued-statement-offset: 2
+## perl-continued-brace-offset: 0
+## perl-brace-offset: 0
+## perl-brace-imaginary-offset: 0
+## perl-label-offset: -2
+## cperl-indent-level: 2
+## cperl-brace-offset: 0
+## cperl-continued-brace-offset: 0
+## cperl-label-offset: -2
+## cperl-extra-newline-before-brace: t
+## cperl-merge-trailing-else: nil
+## cperl-continued-statement-offset: 2
+## End:
index 9805024..ac9356a 100644 (file)
@@ -25,6 +25,7 @@ dist_perllib_DATA = \
   DisjConditions.pm \
   FileUtils.pm \
   General.pm \
+  Getopt.pm \
   Item.pm \
   ItemDef.pm \
   Location.pm \
index cd57877..6835cab 100644 (file)
@@ -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',
index bc01dcf..bbb964f 100644 (file)
@@ -1,6 +1,6 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2011
-# Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2011,
+# 2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -12,6 +12,9 @@
 # ---------------------------------------------------
 # Add --enable-multilib to configure.
 AC_DEFUN([AM_ENABLE_MULTILIB],
+[m4_warn([obsolete], [$0 will be removed from Automake core soon.
+Files implementing the "multilib" feature are (and will remain) available
+to the 'contrib/' directory in the Automake distribution.])]dnl
 [# Default to --enable-multilib
 AC_ARG_ENABLE([multilib],
 [AS_HELP_STRING(
index d42dd68..dc16ad5 100644 (file)
@@ -28,16 +28,7 @@ AM_PL_LOG_FLAGS = -Mstrict -I $(top_builddir)/lib -I $(top_srcdir)/lib -w
 
 TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/lib/tap-driver.sh
 
-AM_TAP_LOG_DRIVER_FLAGS = --merge --comments
-## Avoid spurious TAP diagnostic.  We use an awful indirection with a
-## shell command substitution here, since the string needs to contain
-## `#' characters, and these can't be escaped portably in a make macro
-## definition.
-## FIXME: this is quite inefficient though, as it adds one extra fork
-## FIXME: per TAP test script; this is OK for the moment, since we have
-## FIXME: few such scripts, but might become an issue in the future.
-## Keep this in sync with the definition of $diag_string_ in tests/defs.
-AM_TAP_LOG_DRIVER_FLAGS += --diagnostic-string `printf '\043%%\043\n'`
+AM_TAP_LOG_DRIVER_FLAGS = --merge
 
 EXTRA_DIST = ChangeLog-old
 
index 1a642b5..64d9b62 100755 (executable)
@@ -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
index 18f193c..40842cd 100644 (file)
@@ -230,10 +230,6 @@ else
 fi
 unset am_funcs_file
 
-# Avoid spurious TAP diagnostic.  Keep this in sync with the definition
-# of $(TAP_LOG_DRIVER_FLAGS) in `tests/Makefile.am'.
-diag_string_="#%#"
-
 # cross_compiling
 # ---------------
 # Tell whether we are cross-compiling.  This is especially useful to skip
index 34399bc..dd9d896 100755 (executable)
@@ -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 "
index d3e4839..5e90d0a 100755 (executable)
@@ -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/getopt.test b/tests/getopt.test
deleted file mode 100755 (executable)
index 41aca0c..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2002, 2003, 2008, 2011 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/>.
-
-# Automake --help, and --version should have priority over any other option
-# so that their `Exit 0' is coherent.
-
-. ./defs || Exit 1
-
-# This is expected to fail ...
-AUTOMAKE_fails -Wnonexistent
-grep ':.*nonexistent' stderr
-
-# ... but this should not.
-AUTOMAKE_run -Wnonexistent --help
-grep ':.*nonexistent' stderr && Exit 1
-
-
-# Similarly, this should fail ...
-AUTOMAKE_fails --nonexistent
-grep ':.*nonexistent' stderr
-
-# ... but this should not.
-AUTOMAKE_run --nonexistent --help
-grep ':.*nonexistent' stderr && Exit 1
-
-:
index 589f90e..31d70a7 100644 (file)
@@ -437,7 +437,6 @@ gcj3.test \
 gcj4.test \
 gcj5.test \
 gcj6.test \
-getopt.test \
 gettext.test \
 gettext2.test \
 gettext3.test \
@@ -700,8 +699,8 @@ parallel-tests-suffix.test \
 parallel-tests-suffix-prog.test \
 parallel-tests-log-compiler-1.test \
 parallel-tests-log-compiler-2.test \
-parallel-tests-dry-run.test \
-parallel-tests-dryrun.test \
+parallel-tests-dry-run-1.test \
+parallel-tests-dry-run-2.test \
 parallel-tests-fd-redirect.test \
 parallel-tests-extra-programs.test \
 parallel-tests-unreadable.test \
index 28b4198..f0c284b 100755 (executable)
@@ -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
 
index abb5a16..894effb 100755 (executable)
@@ -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
 required='gcc GNUmake'
 . ./defs || Exit 1
 
+# Multilib support has been deprecated in the Automake core.
+
+cat >>configure.in <<'END'
+AM_ENABLE_MULTILIB([Makefile], [.])
+END
+
+$ACLOCAL
+$AUTOCONF -Wall -Werror 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep '^configure\.in:4:.*AM_ENABLE_MULTILIB.* removed.* soon' stderr
+grep '"multilib".*feature' stderr
+grep 'contrib.* in the Automake distribution' stderr
+
+rm -rf autom4te*.cache aclocal.m4 configure
+
+# Functional tests now.
+
 cat >configure.in <<'END'
 AC_INIT([multlib], [1.0])
 AC_CONFIG_SRCDIR(libfoo/foo.c)
@@ -110,16 +127,16 @@ mkdir libbar/sub
 
 cp "$am_scriptdir"/config-ml.in "$am_scriptdir"/symlink-tree .
 
-$ACLOCAL
-$AUTOCONF
+$ACLOCAL -Wno-obsolete
+$AUTOCONF -Werror -Wall -Wno-obsolete
 $AUTOMAKE --add-missing
 cd libfoo
 $ACLOCAL
-$AUTOCONF
+$AUTOCONF -Werror -Wall -Wno-obsolete
 $AUTOMAKE --add-missing
 cd ../libbar
 $ACLOCAL
-$AUTOCONF
+$AUTOCONF -Werror -Wall -Wno-obsolete
 $AUTOMAKE --add-missing
 cd ..
 
index 0692164..120986c 100755 (executable)
@@ -19,8 +19,6 @@
 
 . ./defs || Exit 1
 
-set -e
-
 echo AC_OUTPUT >> configure.in
 
 cat > Makefile.am <<'END'
similarity index 96%
rename from tests/parallel-tests-dryrun.test
rename to tests/parallel-tests-dry-run-1.test
index 3cec67e..4ed59f0 100755 (executable)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check parallel-tests interactions with "make -n".
+# See also sister test 'parallel-tests-dry-run-2.test'.
 
 am_parallel_tests=yes
 . ./defs || Exit 1
 
-set -e
-
 echo AC_OUTPUT >> configure.in
 
 cat > Makefile.am <<'END'
similarity index 93%
rename from tests/parallel-tests-dry-run.test
rename to tests/parallel-tests-dry-run-2.test
index 3a136f4..c81286e 100755 (executable)
@@ -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
@@ -14,8 +14,8 @@
 # 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 `make -n' for testsuite-related targets, when `parallel-tests'
-# is in use.
+# Check parallel-tests interactions with "make -n".
+# See also sister test 'parallel-tests-dry-run-1.test'.
 
 am_parallel_tests=yes
 . ./defs || Exit 1
index 0024b5d..4e5d73e 100755 (executable)
@@ -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
@@ -19,8 +19,6 @@
 
 . ./defs || Exit 1
 
-set -e
-
 cat >>configure.in <<'EOF'
 AM_SILENT_RULES
 AC_PROG_CC
index b08c9f8..3dd4180 100755 (executable)
@@ -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
index f597a7f..b1d1baf 100755 (executable)
 
 # Vala sources and C sources in the same program.  Functional test.
 
-required='cc GNUmake'
+required='valac cc GNUmake'
 . ./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
index 8f2b677..c878c86 100755 (executable)
@@ -20,8 +20,6 @@
 required="valac GNUmake"
 . ./defs || Exit 1
 
-set -e
-
 cat >> configure.in << 'END'
 AC_CONFIG_SRCDIR([hello.vala])
 AC_PROG_CC
index e1d2676..d027a6d 100755 (executable)
@@ -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
+
 :