automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12-65-g


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12-65-g0fec8df
Date: Wed, 02 May 2012 16:52:52 +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=0fec8df49cf76b50e5ea2d4fafea57c0aed8a90d

The branch, master has been updated
       via  0fec8df49cf76b50e5ea2d4fafea57c0aed8a90d (commit)
       via  cd4dab35d5d592b83318670ec9084de968ccfbc4 (commit)
       via  3b447abc8077408e6c0c28611cebecdc48e8acb0 (commit)
       via  a66cd033b740af00dbb8424aec3a8d5c499cc198 (commit)
       via  f9dbb0a6294fa6978833f9eb1b3286f076a8f986 (commit)
       via  93814708ba465b5834ec10ec1fb66eceb9674274 (commit)
       via  180158114544e2bf0c11c36f373c28331d0a9ee3 (commit)
       via  14141f258ac8d5d14b9479eaf2bb82189bd17bf5 (commit)
       via  4c2dd6e09a01656b0ab0838812559a69e12e7b5e (commit)
       via  5eeb36603d197ed73a031cea70843e9b43d312b9 (commit)
       via  f5733aabe7c186a04f288214cb840a423d5b821b (commit)
       via  6e5b444165b420ba757fed2f3973da37d6df6ffe (commit)
      from  1ad72bca60963a9736cc4795057af3750a116728 (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 0fec8df49cf76b50e5ea2d4fafea57c0aed8a90d
Merge: cd4dab3 14141f2
Author: Stefano Lattarini <address@hidden>
Date:   Wed May 2 18:15:41 2012 +0200

    Merge branch 'always-support-silent-rules'
    
    * always-support-silent-rules:
      silent rules: support for them is always active now
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit cd4dab35d5d592b83318670ec9084de968ccfbc4
Merge: 1ad72bc 3b447ab
Author: Stefano Lattarini <address@hidden>
Date:   Wed May 2 18:14:55 2012 +0200

    Merge branch 'maint'
    
    * maint:
      news: document improvement in parallel-tests performance
      tests: fix spurious failure due to autom4te caching
      news: fix typos
      aclocal: error out again on unrecognized arguments
      parallel-tests: save few forks when possible
      parallel-tests: optimize global log creation
      parallel-tests: optimize 'recheck' target for speed
      coverage: add performance tests on some parallel-tests aspects

commit 14141f258ac8d5d14b9479eaf2bb82189bd17bf5
Author: Stefano Lattarini <address@hidden>
Date:   Tue May 1 14:23:04 2012 +0200

    silent rules: support for them is always active now
    
    Before this change, support for silent rules was optional and activated
    only if the 'silent-rules' option was specified.
    
    The rationale behind that behaviour was that the silent-rules machinery
    originally only worked with make implementations supporting nested
    variables expansions, which isn't (or wasn't) a POSIX-specified features;
    so that packages wanting to be "extra-portable" couldn't use the
    silent-rules machinery at all.
    
    But after Paul Eggert's commit 'v1.11-598-g8493499' of 25-12-2011,
    "silent-rules: fallback for makes without nested vars" (motivated
    by automake bugs #9928 and #10237), Makefiles generated when the
    'silent-rules' option is enabled can work also with those make
    implementations that don't support nested variables expansion (albeit
    the configure-time selected verbosity cannot be overridden at make
    runtime in such case).
    
    In light of that, and since silent rules are disabled by default even
    when the 'silent-rules' option is given (unless the developer explicitly
    makes them enabled by default be calling "AM_SILENT_RULES([yes])" in
    configure.ac), we can now have the support for silent rules always
    enabled.
    
    The 'silent-rules' option will thus become a no-op, but will reaming a
    valid option for the time being, for better backward-compatibility.
    
    A collateral effect of this change is that the use of the 'silent-rules'
    option will not anymore automatically disable the warnings in the
    'portability-recursive' category.
    
    The present change is basically a backport of the Automake-NG commit
    'v1.11d-75-g61ca923' of 19-04-2012, "[ng] silent rules: support for
    them is always active now".  Stemmed by this thread on the Automake-NG
    list:
    <http://lists.gnu.org/archive/html/automake-ng/2012-04/msg00027.html>
    
    * automake.in: Enable silent-rules machinery unconditionally.  Reword
    some comments.  Do not switch off warnings in the category
    'portability-recursive' anymore if the 'silent-rules' option is
    given.
    * m4/init.m4: Call 'AC_REQUIRE' on 'AM_SILENT_RULES' unconditionally.
    * lib/Automake/Options.pm: Recognize 'silent-rules' as a dummy option.
    Do not bother anymore checking that it is set in 'configure.ac'.
    * t/silent.sh: Remove now-redundant calls to AM_SILENT_RULES.
    * t/silent2.sh: Likewise.
    * t/silent3.sh: Likewise.
    * t/silent4.sh: Likewise.
    * t/silent8.sh: Likewise.
    * t/silent9.sh: Likewise.
    * t/silent-lex.sh: Likewise.
    * t/silent-many-gcc.sh: Likewise.
    * t/silent-many-generic.sh: Likewise.
    * t/silent-yacc-headers.sh: Likewise.
    * t/silent-yacc.sh: Likewise.
    * t/silentcxx-gcc.sh: Likewise.
    * t/silentcxx.sh: Likewise.
    * t/silentf77.sh: Likewise.
    * t/silentf90.sh: Likewise.
    * t/help-silent.sh: Likewise.
    * t/silent-configsite.sh: Likewise, and other minor adjustments.
    * t/silent7.sh: Likewise.  Also, extend to check that silent rules
    are disabled by default, and remove obsoleted checks about the
    'silent-rules' option being rejected in 'AUTOMAKE_OPTIONS'.
    * t/silent6.sh: Remove now-redundant calls to 'AM_SILENT_RULES'.
    Call automake with '-Wno-portability-recursive'.  Remove other
    obsoleted checks.
    * t/dollarvar.sh: Don't expect the use of 'AM_SILENT_RULES' in
    'configure.ac' to disable warning in the 'portability-recursive'
    category anymore.
    * t/compile_f_c_cxx.sh: Adjust to avoid a spurious failure.
    * t/silent-amopts.sh: Remove as obsolete.
    * t/silent-nowarn.sh: Likewise.
    * t/list-of-tests.mk: Adjust.
    * NEWS: Update.
    * doc/automake.texi: Update and simplify accordingly.
    * configure.ac (AM_INIT_AUTOMAKE): Remove 'silent-rules' option.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 NEWS                              |   23 ++++-
 aclocal.in                        |    6 +
 automake.in                       |   62 +++++--------
 configure.ac                      |    2 +-
 doc/automake.texi                 |  105 +++++++---------------
 lib/Automake/Options.pm           |    5 +-
 lib/am/check.am                   |  185 ++++++++++++++++++++++++++-----------
 m4/init.m4                        |    2 +-
 t/aclocal.sh                      |    5 +
 t/compile_f_c_cxx.sh              |    6 +-
 t/dollarvar.sh                    |   11 +--
 t/help-silent.sh                  |   19 ++--
 t/list-of-tests.mk                |    5 +-
 t/rst-formatting.sh               |   93 -------------------
 t/silent-amopts.sh                |   28 ------
 t/silent-configsite.sh            |   12 ++-
 t/silent-lex.sh                   |    1 -
 t/silent-many-gcc.sh              |    1 -
 t/silent-many-generic.sh          |    1 -
 t/silent-nowarn.sh                |   44 ---------
 t/silent-yacc-headers.sh          |    1 -
 t/silent-yacc.sh                  |    1 -
 t/silent.sh                       |    1 -
 t/silent2.sh                      |    1 -
 t/silent3.sh                      |    1 -
 t/silent4.sh                      |    1 -
 t/silent6.sh                      |   39 +--------
 t/silent7.sh                      |   14 +--
 t/silent8.sh                      |    5 +-
 t/silent9.sh                      |    1 -
 t/silentcxx-gcc.sh                |    1 -
 t/silentcxx.sh                    |    1 -
 t/silentf77.sh                    |    1 -
 t/silentf90.sh                    |    1 -
 t/suffix.sh                       |    4 +-
 t/test-trs-recover2.sh            |   10 --
 t/testsuite-recheck-speed.sh      |   99 ++++++++++++++++++++
 t/testsuite-summary-count-many.sh |    4 +-
 t/testsuite-summary-speed.sh      |   76 +++++++++++++++
 39 files changed, 427 insertions(+), 451 deletions(-)
 delete mode 100755 t/rst-formatting.sh
 delete mode 100755 t/silent-amopts.sh
 delete mode 100755 t/silent-nowarn.sh
 create mode 100755 t/testsuite-recheck-speed.sh
 create mode 100755 t/testsuite-summary-speed.sh

diff --git a/NEWS b/NEWS
index a731fe3..8e2ee31 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,17 @@ New in 1.13:
 
   - All the "old alias" macros in 'm4/obsolete.m4' have been removed.
 
+* Silent rules support:
+
+  - Support for silent rules is now always active in Automake-generated
+    Makefiles.  So, although the verbose output is still the default,
+    the user can now always use "./configure --enable-silent-rules" or
+    "make V=0" to enable quieter output in the package he's building.
+
+  - The 'silent-rules' option has now become a no-op, preserved for
+    backward-compatibility only.  In particular, its use does not disable
+    the warnings in the 'portability-recursive' category anymore.
+
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 New in 1.12.1:
@@ -76,8 +87,13 @@ Bugs fixed in 1.12.1:
 
 * Bugs introduced by 1.12:
 
-   - Several weaknesses in the Automake's own build system test suite
-     have been fixed.
+  - Several weaknesses in Automake's own build system and test suite
+    have been fixed.
+
+* Bugs introduced by 1.11.3:
+
+  - When given non-option arguments, aclocal rejects them, instead of
+    silently ignoring them.
 
 * Long-standing bugs:
 
@@ -86,6 +102,9 @@ Bugs fixed in 1.12.1:
     a non-ANSI one, i.e., if the TERM environment variable has a value of
     "dumb".
 
+  - Several inefficiencies and poor performances in the implementation
+    of the parallel-tests 'check' and 'recheck' targets have been fixed.
+
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 New in 1.12:
diff --git a/aclocal.in b/aclocal.in
index a5c0ea5..5af016a 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -972,6 +972,12 @@ sub parse_arguments ()
   use Automake::Getopt ();
   Automake::Getopt::parse_options %cli_options;
 
+  if (@ARGV > 0)
+    {
+      fatal ("non-option arguments are not accepted: '$ARGV[0]'.\n"
+             . "Try '$0 --help' for more information.");
+    }
+
   if ($print_and_exit)
     {
       print "@system_includes\n";
diff --git a/automake.in b/automake.in
index f2f6c07..555aadb 100644
--- a/automake.in
+++ b/automake.in
@@ -1100,11 +1100,11 @@ sub backname ($)
 
 ################################################################
 
-# 'silent-rules' mode handling functions.
+# Silent rules handling functions.
 
 # verbose_var (NAME)
 # ------------------
-# The public variable stem used to implement 'silent-rules'.
+# The public variable stem used to implement silent rules.
 sub verbose_var ($)
 {
     my ($name) = @_;
@@ -1113,7 +1113,7 @@ sub verbose_var ($)
 
 # verbose_private_var (NAME)
 # --------------------------
-# The naming policy for the private variables for 'silent-rules'.
+# The naming policy for the private variables for silent rules.
 sub verbose_private_var ($)
 {
     my ($name) = @_;
@@ -1122,25 +1122,23 @@ sub verbose_private_var ($)
 
 # define_verbose_var (NAME, VAL)
 # ------------------------------
-# For 'silent-rules' mode, setup VAR and dispatcher, to expand to VAL if 
silent.
+# For silent rules, setup VAR and dispatcher, to expand to VAL if silent.
 sub define_verbose_var ($$)
 {
     my ($name, $val) = @_;
     my $var = verbose_var ($name);
     my $pvar = verbose_private_var ($name);
     my $silent_var = $pvar . '_0';
-    if (option 'silent-rules')
-      {
-       # For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V)
-       # and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY).
-       # For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead.
-       # See AM_SILENT_RULES in m4/silent.m4.
-       define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL);
-       define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)', 
INTERNAL);
-       Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE, $val,
-                                   '', INTERNAL, VAR_ASIS)
-         if (! vardef ($silent_var, TRUE));
-      }
+    # For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V)
+    # and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY).
+    # For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead.
+    # See AM_SILENT_RULES in m4/silent.m4.
+    define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL);
+    define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)',
+                     INTERNAL);
+    Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE, $val,
+                                '', INTERNAL, VAR_ASIS)
+      if (! vardef ($silent_var, TRUE));
 }
 
 # Above should not be needed in the general automake code.
@@ -1151,17 +1149,13 @@ sub define_verbose_var ($$)
 sub verbose_flag ($)
 {
     my ($name) = @_;
-    return '$(' . verbose_var ($name) . ')'
-      if (option 'silent-rules');
-    return '';
+    return '$(' . verbose_var ($name) . ')';
 }
 
 sub verbose_nodep_flag ($)
 {
     my ($name) = @_;
-    return '$(' . verbose_var ($name) . subst ('am__nodep') . ')'
-      if (option 'silent-rules');
-    return '';
+    return '$(' . verbose_var ($name) . subst ('am__nodep') . ')';
 }
 
 # silent_flag
@@ -1174,20 +1168,17 @@ sub silent_flag ()
 
 # define_verbose_tagvar (NAME)
 # ----------------------------
-# Engage the needed 'silent-rules' machinery for tag NAME.
+# Engage the needed silent rules machinery for tag NAME.
 sub define_verbose_tagvar ($)
 {
     my ($name) = @_;
-    if (option 'silent-rules')
-      {
-       define_verbose_var ($name, '@echo "  '. $name . ' ' x (8 - length 
($name)) . '" $@;');
-       define_verbose_var ('at', '@');
-      }
+    define_verbose_var ($name, '@echo "  '. $name . ' ' x (8 - length ($name)) 
. '" $@;');
+    define_verbose_var ('at', '@');
 }
 
 # define_verbose_texinfo
 # ----------------------
-# Engage the needed 'silent-rules' machinery for assorted texinfo commands.
+# Engage the needed silent rules machinery for assorted texinfo commands.
 sub define_verbose_texinfo ()
 {
   my @tagvars = ('DVIPS', 'MAKEINFO', 'INFOHTML', 'TEXI2DVI', 'TEXI2PDF');
@@ -1201,7 +1192,7 @@ sub define_verbose_texinfo ()
 
 # define_verbose_libtool
 # ----------------------
-# Engage the needed 'silent-rules' machinery for 'libtool --silent'.
+# Engage the needed silent rules machinery for 'libtool --silent'.
 sub define_verbose_libtool ()
 {
     define_verbose_var ('lt', '--silent');
@@ -1229,10 +1220,6 @@ sub handle_options
       return 1 if process_option_list (@options);
     }
 
-  # Override portability-recursive warning.
-  switch_warning ('no-portability-recursive')
-    if option 'silent-rules';
-
   if ($strictness == GNITS)
     {
       set_option ('readme-alpha', INTERNAL);
@@ -1566,7 +1553,7 @@ sub handle_languages
        define_linker_variable ($languages{'c'});
       }
 
-    # Always provide the user with 'AM_V_GEN' for 'silent-rules' mode.
+    # Always provide the user with 'AM_V_GEN' for silent rules.
     define_verbose_tagvar ('GEN');
 }
 
@@ -5198,7 +5185,6 @@ sub scan_autoconf_traces ($)
                AM_MAINTAINER_MODE => 0,
                AM_PROG_AR => 0,
                AM_PROG_CC_C_O => 0,
-               AM_SILENT_RULES => 0,
                _AM_SUBST_NOTMAKE => 1,
                _AM_COND_IF => 1,
                _AM_COND_ELSE => 1,
@@ -5390,10 +5376,6 @@ sub scan_autoconf_traces ($)
        {
          $seen_cc_c_o = $where;
        }
-      elsif ($macro eq 'AM_SILENT_RULES')
-        {
-         set_global_option ('silent-rules', $where);
-       }
       elsif ($macro eq '_AM_COND_IF')
         {
          cond_stack_if ('', $args[1], $where);
diff --git a/configure.ac b/configure.ac
index 6c4208a..6215aae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,7 +40,7 @@ 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([dist-xz filename-length-max=99 color-tests
-                 parallel-tests silent-rules no-define no-dependencies])
+                 parallel-tests no-define no-dependencies])
 
 ## Keep this on a line of its own, since it must be found and processed
 ## by the 'update-copyright' rule in our Makefile.
diff --git a/doc/automake.texi b/doc/automake.texi
index 1bea8e9..59c039d 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -357,9 +357,9 @@ Conditionals
 
 Silencing Make
 
-* Make verbosity::               Make is verbose by default
-* Tricks For Silencing Make::    Standard and generic ways to silence make
-* Automake silent-rules Option:: How Automake can help in silencing make
+* Make verbosity::              Make is verbose by default
+* Tricks For Silencing Make::   Standard and generic ways to silence make
+* Automake Silent Rules::       How Automake can help in silencing make
 
 When Automake Isn't Enough
 
@@ -2695,8 +2695,6 @@ variables.
 The categories output by default are @samp{syntax} and
 @samp{unsupported}.  Additionally, @samp{gnu} and @samp{portability}
 are enabled in @option{--gnu} and @option{--gnits} strictness.
-On the other hand, the @option{silent-rules} options (@pxref{Options})
-turns off portability warnings about recursive variable expansions.
 
 @c Checked by extra-portability.sh
 Turning off @samp{portability} will also turn off @samp{extra-portability},
@@ -4040,7 +4038,8 @@ compiler is found.
 
 @item AM_SILENT_RULES
 @acindex AM_SILENT_RULES
-Enable the machinery for less verbose build output (@pxref{Options}).
+Control the machinery for less verbose build output
+(@pxref{Automake Silent Rules}).
 
 @item AM_WITH_DMALLOC
 @acindex AM_WITH_DMALLOC
@@ -5401,9 +5400,8 @@ The libtool rules also use a @code{LIBTOOLFLAGS} variable 
that should
 not be set in @file{Makefile.am}: this is a user variable (@pxref{Flag
 Variables Ordering}.  It allows users to run @samp{make
 LIBTOOLFLAGS=--silent}, for instance.  Note that the verbosity of
address@hidden can also be influenced with the Automake
address@hidden option (@pxref{Options}).
-
address@hidden can also be influenced by the Automake support
+for silent rules (@pxref{Automake Silent Rules}).
 
 @node LTLIBOBJS, Libtool Issues, Libtool Flags, A Shared Library
 @subsection @code{LTLIBOBJS} and @code{LTALLOCA}
@@ -10085,23 +10083,6 @@ non-alpha releases.  The second form is
 @address@hidden@address@hidden, where @var{alpha} is a
 letter; it should be omitted for non-alpha releases.
 
address@hidden @option{silent-rules}
address@hidden Option, @option{silent-rules}
address@hidden silent-rules
-Enable less verbose build rules.  This can be used to let build rules
-output status lines of the form:
address@hidden
-GEN @var{output-file}
- CC @var{object-file}
address@hidden example
address@hidden
-instead of printing the command that will be executed to update
address@hidden or to compile @var{object-file}.  It can also
-silence @command{libtool} output.
-
-For more information about how to use, enable, or disable silent
-rules, @pxref{Automake silent-rules Option}.
-
 @item @option{std-options}
 @cindex Options, @option{std-options}
 @cindex @samp{make installcheck}, testing @option{--help} and 
@option{--version}
@@ -10583,9 +10564,9 @@ Libtool Sources}).
 @cindex Silent @command{make} rules
 
 @menu
-* Make verbosity::               Make is verbose by default
-* Tricks For Silencing Make::    Standard and generic ways to silence make
-* Automake silent-rules Option:: How Automake can help in silencing make
+* Make verbosity::              Make is verbose by default
+* Tricks For Silencing Make::   Standard and generic ways to silence make
+* Automake Silent Rules::       How Automake can help in silencing make
 @end menu
 
 @node Make verbosity
@@ -10620,8 +10601,8 @@ the easy detection of potentially important warning 
messages.
 
 Here we describe some common idioms/tricks to obtain a quieter make
 output, with their relative advantages and drawbacks.  In the next
-section (@ref{Automake silent-rules Option}) we'll see how Automake
-can help in this respect.
+section (@ref{Automake Silent Rules}) we'll see how Automake can help
+in this respect, providing more elaborate and flexible idioms.
 
 @itemize @bullet
 
@@ -10673,20 +10654,19 @@ automatically activated if the @option{-s} flag is 
used.
 
 @end itemize
 
address@hidden Automake silent-rules Option
address@hidden Automake Silent Rules
 @section How Automake can help in silencing make
 
 The tricks and idioms for silencing @command{make} described in the
 previous section can be useful from time to time, but we've seen that
 they all have their serious drawbacks and limitations.  That's why
 automake provides support for a more advanced and flexible way of
-obtaining quieter output from @command{make}: the @option{silent-rules}
-mode.
+obtaining quieter output from @command{make} (for most rules at least).
 
 @c TODO: Maybe describe in brief the precedent set by the build system
 @c of the Linux Kernel, from which Automake took inspiration ... Links?
 
-To give the gist of what @option{silent-rules} can do, here is a simple
+To give the gist of what Automake can do in this respect, here is a simple
 comparison between a typical @command{make} output (where silent rules
 are disabled) and one with silent rules enabled:
 
@@ -10735,7 +10715,7 @@ func.c:4:3: warning: ‘i’ used uninitialized in this 
function
   CCLD   foo
 @end example
 
address@hidden silent-rules and libtool
address@hidden silent rules and libtool
 Also, in projects using @command{libtool}, the use of silent rules can
 automatically enable the @command{libtool}'s @option{--silent} option:
 
@@ -10761,26 +10741,9 @@ libtool: link: cd .libs && rm -f libx.so && ln -s 
libx.so.0.0.0 libx.so
   CCLD   libx.la
 @end example
 
-Let's now see how the @option{silent-rules} mode interfaces with the
-package developer and the package user.
-
-To enable the use of @option{silent-rules} in his package, a developer
-needs to do either of the following:
-
address@hidden @bullet
address@hidden
-Add the @option{silent-rules} option as argument to @code{AM_INIT_AUTOMAKE}.
address@hidden
-Call the @code{AM_SILENT_RULES} macro from within the @file{configure.ac}
-file.
address@hidden itemize
-
-It is not possible to instead specify @option{silent-rules} in a
address@hidden file.
-
-If the developer has done either of the above, then the user of the
-package may influence the verbosity at @command{configure} run time as
-well as at @command{make} run time:
+For Automake-generated @file{Makefile}s, the user may influence the
+verbosity at @command{configure} run time as well as at @command{make}
+run time:
 
 @itemize @bullet
 @item
@@ -10796,17 +10759,16 @@ time may be overridden: @code{make V=1} will produce 
verbose output,
 @code{make V=0} less verbose output.
 @end itemize
 
address@hidden default verbosity for silent-rules
address@hidden default verbosity for silent rules
 Note that silent rules are @emph{disabled} by default; the user must
 enable them explicitly at either @command{configure} run time or at
 @command{make} run time.  We think that this is a good policy, since
 it provides the casual user with enough information to prepare a good
 bug report in case anything breaks.
 
-Still, notwithstanding the rationales above, a developer who wants to
-make silent rules enabled by default in his own package can do so by
-adding a @samp{yes} argument to the @code{AM_SILENT_RULES} call in
address@hidden  We advise against this approach, though.
+Still, notwithstanding the rationales above, a developer who really
+wants to make silent rules enabled by default in his own package can
+do so by calling @code{AM_SILENT_RULES([yes])} in @file{configure.ac}.
 
 @c Keep in sync with silent-configsite.sh
 Users who prefer to have silent rules enabled by default can edit their
@@ -10819,16 +10781,13 @@ For portability to different @command{make} 
implementations, package authors
 are advised to not set the variable @code{V} inside the @file{Makefile.am}
 file, to allow the user to override the value for subdirectories as well.
 
-The current implementation of this feature normally uses nested
-variable expansion @samp{$(@var{var1}$(V))}, a @file{Makefile} feature
-that is not required by POSIX 2008 but is widely supported in
-practice.  The @option{silent-rules} option thus turns off warnings
-about recursive variable expansion, which are in turn enabled by
address@hidden (@pxref{automake Invocation}).  On the rare
address@hidden implementations that do not support nested variable
-expansion, whether rules are silent is always determined at configure
-time, and cannot be overridden at make time.  Future versions of POSIX
-are likely to require nested variable expansion, so this minor
+To work at its best, the current implementation of this feature normally
+uses nested variable expansion @samp{$(@var{var1}$(V))}, a @file{Makefile}
+feature that is not required by POSIX 2008 but is widely supported in
+practice.  On the rare @command{make} implementations that do not support
+nested variable expansion, whether rules are silent is always determined at
+configure time, and cannot be overridden at make time.  Future versions of
+POSIX are likely to require nested variable expansion, so this minor
 limitation should go away with time.
 
 @vindex @code{AM_V_GEN}
@@ -12840,8 +12799,8 @@ generated by @command{automake} effectively:
 
 @itemize
 @item
-If less verbose output has been enabled in the package with the
address@hidden option (@pxref{Options}), you can use
+If less verbose output has been enabled in the package with the use
+of silent rules (@pxref{Automake Silent Rules}), you can use
 @code{make V=1} to see the commands being executed.
 @item
 @code{make -n} can help show what would be done without actually doing
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index ede9326..231600b 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -286,6 +286,7 @@ sub _is_valid_easy_option ($)
     no-texinfo.tex
     nostdinc
     readme-alpha
+    silent-rules
     std-options
     subdir-objects
   );
@@ -341,10 +342,6 @@ sub _process_option_list (\%@)
           delete $options->{$_};
           $options->{'filename-length-max'} = [$_, $1];
         }
-      elsif ($_ eq 'silent-rules')
-        {
-          _option_must_be_from_configure ($_, $where);
-        }
       elsif ($_ eq 'tar-v7' || $_ eq 'tar-ustar' || $_ eq 'tar-pax')
         {
           _option_must_be_from_configure ($_, $where);
diff --git a/lib/am/check.am b/lib/am/check.am
index 73febb1..522c953 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -59,9 +59,112 @@ include inst-vars.am
 ## of more test metadata, and the use of custom test derivers and protocols
 ## (among them, TAP).
 
-# Restructured Text title and section.
+am__recheck_rx = ^[    ]*:recheck:[    ]*
+am__global_test_result_rx = ^[         ]*:global-test-result:[         ]*
+am__copy_in_global_log_rx = ^[         ]*:copy-in-global-log:[         ]*
+
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+## By default, we assume the test is to be re-run.
+  recheck = 1; \
+  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+    { \
+      if (rc < 0) \
+        { \
+## If we've encountered an I/O error here, there are three possibilities:
+##
+##  [1] The '.log' file exists, but the '.trs' does not; in this case,
+##      we "gracefully" recover by assuming the corresponding test is
+##      to be re-run (which will re-create the missing '.trs' file).
+##
+##  [2] Both the '.log' and '.trs' files are missing; this means that
+##      the corresponding test has not been run, and is thus *not* to
+##      be re-run.
+##
+##  [3] We have encountered some corner-case problem (e.g., a '.log' or
+##      '.trs' files somehow made unreadable, or issues with a bad NFS
+##      connection, or whatever); we don't handle such corner cases.
+##
+          if ((getline line2 < ($$0 ".log")) < 0) \
+           recheck = 0; \
+          break; \
+        } \
+      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+## A directive explicitly specifying the test is *not* to be re-run.
+        { \
+          recheck = 0; \
+          break; \
+        } \
+      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+        { \
+## A directive explicitly specifying the test *is* to be re-run.
+          break; \
+        } \
+## else continue with the next iteration.
+    }; \
+  if (recheck) \
+    print $$0; \
+## Don't leak open file descriptors, as this could cause serious
+## problems when there are many tests (yes, even on Linux).
+  close ($$0 ".trs"); \
+  close ($$0 ".log"); \
+}'
+
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+  print "fatal: making $@: " msg | "cat >&2"; \
+  exit 1; \
+} \
+function rst_section(header) \
+{ \
+  print header; \
+  len = length(header); \
+  for (i = 1; i <= len; i = i + 1) \
+    printf "="; \
+  printf "\n\n"; \
+} \
+{ \
+## By default, we assume the test log is to be copied in the global log,
+## and that its result is simply "RUN" (i.e., we still don't know what
+## it outcome was, but we know that at least it has run).
+  copy_in_global_log = 1; \
+  global_test_result = "RUN"; \
+  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+    { \
+      if (rc < 0) \
+         fatal("failed to read from " $$0 ".trs"); \
+      if (line ~ /$(am__global_test_result_rx)/) \
+        { \
+          sub("$(am__global_test_result_rx)", "", line); \
+          sub("[       ]*$$", "", line); \
+          global_test_result = line; \
+        } \
+      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+        copy_in_global_log = 0; \
+    }; \
+  if (copy_in_global_log) \
+    { \
+      rst_section(global_test_result ": " $$0); \
+      while ((rc = (getline line < ($$0 ".log"))) != 0) \
+      { \
+        if (rc < 0) \
+          fatal("failed to read from " $$0 ".log"); \
+        print line; \
+      }; \
+    }; \
+## Don't leak open file descriptors, as this could cause serious
+## problems when there are many tests (yes, even on Linux).
+  close ($$0 ".trs"); \
+  close ($$0 ".log"); \
+}'
+
+# Restructured Text title.
 am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
-am__rst_section = { sed 'p;s/./=/g;' && echo; }
 
 # Solaris 10 'make', and several other traditional 'make' implementations,
 # pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
@@ -86,8 +189,12 @@ $(am__sh_e_setup);                                  \
 $(am__vpath_adj_setup) $(am__vpath_adj)                        \
 $(am__tty_colors);                                     \
 srcdir=$(srcdir); export srcdir;                       \
-am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;           \
-test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?;        \
+case "$@" in                                           \
+  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;   \
+    *) am__odir=.;;                                    \
+esac;                                                  \
+test "x$$am__odir" = x"." || test -d "$$am__odir"      \
+  || $(MKDIR_P) "$$am__odir" || exit $$?;              \
 if test -f "./$$f"; then dir=./;                       \
 elif test -f "$$f"; then dir=;                         \
 else dir="$(srcdir)/"; fi;                             \
@@ -248,29 +355,9 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          echo;                                                         \
          echo ".. contents:: :depth: 2";                               \
          echo;                                                         \
-         for i in $$bases; do                                          \
-## FIXME: one fork per test -- this is horrendously inefficient!
-           if grep "^$$ws*:copy-in-global-log:$$ws*no$$ws*$$" $$i.trs \
-                >/dev/null; then continue; \
-           fi; \
-## Get the declared "global result" of the test.
-## FIXME: yet another one fork per test here!
-           glob_res=`sed -n -e "s/$$ws*$$//" \
-                            -e "s/^$$ws*:global-test-result:$$ws*//p" \
-                       $$i.trs`; \
-## If no global result is explicitly declared, we'll merely mark the
-## test as "RUN" in the global test log.
-           test -n "$$glob_res" || glob_res=RUN; \
-## Write the name and result of the test as an RST section title.
-           echo "$$glob_res: $$i" | $(am__rst_section); \
-## If we should have remade any unreadable '.log', above.
-           if test ! -r $$i.log; then \
-             echo "fatal: making $@: $$i.log is unreadable" >&2; \
-             exit 1; \
-           fi; \
-           cat $$i.log; echo; \
-         done; \
-       } >$(TEST_SUITE_LOG).tmp;                                       \
+         for b in $$bases; do echo $$b; done                           \
+           | $(am__create_global_log);                                 \
+       } >$(TEST_SUITE_LOG).tmp || exit 1;                             \
        mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);                     \
 ## Emit the test summary on the console.
        if $$success; then                                              \
@@ -330,36 +417,22 @@ check-TESTS recheck:
 ## cannot use '$?' to compute the set of lazily rerun tests, lest
 ## we rely on .PHONY to work portably.
        @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-       @ws='[  ]'; \
-       log_list='' trs_list=''; $(am__set_TESTS_bases); \
-       for i in $$bases; do \
+       @$(am__set_TESTS_bases); \
+       if test $@ = recheck; then \
 ## If running a "make recheck", we must only consider tests that had an
-## unexpected outcome (FAIL or XPASS) in the earlier run.  In particular,
-## skip tests that haven't been run.  But recover gracefully from deleted
-## '.trs' files.
-         if test $@ = recheck; then \
-           test -f $$i.trs || test -f $$i.log || continue; \
-## FIXME: one fork per test -- this is horrendously inefficient!
-           grep "^$$ws*:recheck:$$ws*no$$ws*$$" $$i.trs \
-             >/dev/null 2>&1 && continue; \
-         else :; fi; \
-## Be careful to avoid extra whitespace in the definition of $list, since
-## its value will be passed to the recursive make invocation below through
-## the TEST_LOGS macro, and leading/trailing white space in a make macro
-## definition can be problematic.  In this particular case, trailing white
-## space was known to cause a segmentation fault on Solaris 10 XPG4 make:
-## <http://lists.gnu.org/archive/html/bug-automake/2010-08/msg00004.html>
-         if test -z "$$log_list"; then \
-           log_list="$$i.log"; \
-         else \
-           log_list="$$log_list $$i.log"; \
-         fi; \
-         if test -z "$$trs_list"; then \
-           trs_list="$$i.trs"; \
-         else \
-           trs_list="$$trs_list $$i.trs"; \
-         fi; \
-       done; \
+## unexpected outcome (FAIL or XPASS) in the earlier run.
+         bases=`for i in $$bases; do echo $$i; done \
+                  | $(am__list_recheck_tests)` || exit 1; \
+       fi; \
+       log_list=`for i in $$bases; do echo $$i.log; done`; \
+       trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+## Remove newlines and normalize whitespace, being careful to avoid extra
+## whitespace in the definition of $log_list, since its value will be
+## passed to the recursive make invocation below through the TEST_LOGS
+## macro, and leading/trailing white space in a make macro definition can
+## be problematic.  In this particular case, trailing white space is known
+## to have caused segmentation faults on Solaris 10 XPG4 make:
+       log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
 ## Under "make recheck", remove the .log and .trs files associated
 ## with the files to recheck, so that those will be rerun by the
 ## "make test-suite.log" recursive invocation below.  But use a proper
diff --git a/m4/init.m4 b/m4/init.m4
index 3520dcb..9731527 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -101,7 +101,7 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
                  [define([AC_PROG_OBJC],
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
 ])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+AC_REQUIRE([AM_SILENT_RULES])dnl
 dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
diff --git a/t/aclocal.sh b/t/aclocal.sh
index 4030b13..3e0cac6 100755
--- a/t/aclocal.sh
+++ b/t/aclocal.sh
@@ -34,6 +34,11 @@ cat stderr >&2
 grep 'unrecognized option.*--unknown-option' stderr
 grep '[Tt]ry.*--help.*for more information' stderr
 
+$ACLOCAL foobar 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'non-option argument.*foobar' stderr
+grep '[Tt]ry.*--help.*for more information' stderr
+
 $ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'unrecognized option.*--ver' stderr
diff --git a/t/compile_f_c_cxx.sh b/t/compile_f_c_cxx.sh
index 99893d8..2f093ba 100755
--- a/t/compile_f_c_cxx.sh
+++ b/t/compile_f_c_cxx.sh
@@ -39,8 +39,8 @@ $ACLOCAL
 $AUTOMAKE
 
 # Look for the macros at the beginning of rules.
-$FGREP "$tab\$(COMPILE)"    Makefile.in
-$FGREP "$tab\$(CXXCOMPILE)" Makefile.in
-$FGREP "$tab\$(F77COMPILE)" Makefile.in
+$FGREP "$tab\$(AM_V_CC)\$(COMPILE)"     Makefile.in
+$FGREP "$tab\$(AM_V_CXX)\$(CXXCOMPILE)" Makefile.in
+$FGREP "$tab\$(AM_V_F77)\$(F77COMPILE)" Makefile.in
 
 :
diff --git a/t/dollarvar.sh b/t/dollarvar.sh
index 940ef23..f39fc85 100755
--- a/t/dollarvar.sh
+++ b/t/dollarvar.sh
@@ -35,6 +35,7 @@ blo = $(foo${x})
 EOF
 
 $ACLOCAL
+
 AUTOMAKE_fails -Wportability
 grep 'Makefile.am:2' stderr
 grep 'Makefile.am:3' stderr
@@ -43,15 +44,7 @@ grep 'Makefile.am:5' stderr
 grep 'Makefile.am:6' stderr
 grep 'Makefile.am:7' stderr
 
-# On the other hand, if we allow 'silent-rules' mode, then we need to
-# allow recursive variable expansion, too.
-
-# This should work with the AM_SILENT_RULES macro.
-$sleep
-echo 'AM_SILENT_RULES' >> configure.ac
-
-$ACLOCAL --force
-AUTOMAKE_fails -Wportability
+AUTOMAKE_fails -Wportability -Wno-portability-recursive
 grep 'Makefile.am:2' stderr
 grep 'Makefile.am:3' stderr
 grep 'Makefile.am:4' stderr
diff --git a/t/help-silent.sh b/t/help-silent.sh
index d5fc342..aaa6b6a 100755
--- a/t/help-silent.sh
+++ b/t/help-silent.sh
@@ -14,25 +14,22 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure that our macro 'AM_SILENT_RULES' adds proper text to
-# the configure help screen.
+# Make sure configure options relative to automake silent rules are
+# added to the configure help screen.
 
 . ./defs || Exit 1
 
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-AM_SILENT_RULES
-END
-
+: > Makefile.am
 $ACLOCAL
 
-mv -f configure.ac configure.tmpl
+cp configure.ac configure.tmpl
 
 q="[\`'\"]"
 
-for args in '' '([])' '([yes])' '([no])'; do
-  sed "s/AM_SILENT_RULES.*/&$args/" configure.tmpl >configure.ac
-  cat configure.ac
+for args in '' 'yes' 'no'; do
+  cp -f configure.tmpl configure.ac
+  test x"$args" = x || echo "AM_SILENT_RULES([$args])/" >> configure.ac
+  cat configure.ac # For debugging.
   $AUTOCONF --force
   grep_configure_help --enable-silent-rules \
                       " less verbose build.*\\(undo.*${q}make V=1${q}"
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index b445b9f..3ff1c2c 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -767,6 +767,8 @@ t/testsuite-summary-color.sh \
 t/testsuite-summary-count.sh \
 t/testsuite-summary-count-many.sh \
 t/testsuite-summary-reference-log.sh \
+t/testsuite-recheck-speed.sh \
+t/testsuite-summary-speed.sh \
 t/test-driver-acsubst.sh \
 t/test-driver-cond.sh \
 t/test-driver-custom-no-extra-driver.sh \
@@ -924,7 +926,6 @@ t/req.sh \
 t/reqd.sh \
 t/reqd2.sh \
 t/repeated-options.sh \
-t/rst-formatting.sh \
 t/rulepat.sh \
 t/self-check-cleanup.tap \
 t/self-check-configure-help.sh \
@@ -956,10 +957,8 @@ t/silentcxx.sh \
 t/silentcxx-gcc.sh \
 t/silentf77.sh \
 t/silentf90.sh \
-t/silent-amopts.sh \
 t/silent-many-gcc.sh \
 t/silent-many-generic.sh \
-t/silent-nowarn.sh \
 t/silent-configsite.sh \
 t/silent-nested-vars.sh \
 t/silent-lex.sh \
diff --git a/t/rst-formatting.sh b/t/rst-formatting.sh
deleted file mode 100755
index f23c28c..0000000
--- a/t/rst-formatting.sh
+++ /dev/null
@@ -1,93 +0,0 @@
-#! /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/>.
-
-# Parallel testsuite harness: check APIs for the registering the
-# "global test result" in '*.trs' files, as documented in the automake
-# manual.
-
-am_create_testdir=empty
-. ./defs || Exit 1
-
-sed -n '/^am__rst_[a-z_][a-z_]* =/p' "$am_amdir"/check.am > Makefile \
-  || framework_failure_ "fetching definitions from check.am"
-
-cat >> Makefile << 'END'
-test:
-       printf '%s\n' "$$in" | $(am__rst_title) > title-got
-       printf '%s\n' "$$in" | $(am__rst_section) > section-got
-       cat title-exp
-       cat title-got
-       diff title-exp title-got
-       cat section-exp
-       cat section-got
-       diff section-exp section-got
-END
-
-# -------------------------------------------------------------------------
-
-cat > title-exp <<'END'
-==============
-   ab cd ef
-==============
-
-END
-
-cat > section-exp <<'END'
-ab cd ef
-========
-
-END
-
-env in='ab cd ef' $MAKE test
-
-# -------------------------------------------------------------------------
-
-cat > title-exp <<'END'
-============================================================================
-   0123456789012345678901234567890123456789012345678901234567890123456789
-============================================================================
-
-END
-
-cat > section-exp <<'END'
-0123456789012345678901234567890123456789012345678901234567890123456789
-======================================================================
-
-END
-
-in=0123456789012345678901234567890123456789012345678901234567890123456789
-env in=$in $MAKE test
-
-# -------------------------------------------------------------------------
-
-cat > title-exp <<'END'
-=======
-   x
-=======
-
-END
-
-cat > section-exp <<'END'
-x
-=
-
-END
-
-env in=x $MAKE test
-
-# -------------------------------------------------------------------------
-
-:
diff --git a/t/silent-amopts.sh b/t/silent-amopts.sh
deleted file mode 100755
index f71ad13..0000000
--- a/t/silent-amopts.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/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 automake complaints if the 'silent-rules' option is
-# used in AUTOMAKE_OPTIONS.
-
-. ./defs || Exit 1
-
-echo AUTOMAKE_OPTIONS = silent-rules > Makefile.am
-
-$ACLOCAL
-AUTOMAKE_fails
-grep "^Makefile\.am:1:.*'silent-rules'.*AM_INIT_AUTOMAKE" stderr
-
-:
diff --git a/t/silent-configsite.sh b/t/silent-configsite.sh
index 813753b..d8c2b33 100755
--- a/t/silent-configsite.sh
+++ b/t/silent-configsite.sh
@@ -21,7 +21,7 @@
 . ./defs || Exit 1
 
 cat >> configure.ac <<'EOF'
-AM_SILENT_RULES
+# This line will be edited later to force silent-rules default.
 AC_OUTPUT
 EOF
 
@@ -51,8 +51,9 @@ $MAKE distclean
 
 : 'Disable by default in configure.ac, enable by default in config.site'
 
-sed 's/^AM_SILENT_RULES/&([no])/' configure.ac > configure.tmp
-mv -f configure.tmp configure.ac
+sed 's/.*silent-rules default.*/AM_SILENT_RULES([no])/' configure.ac > t
+diff t configure.ac && fatal_ "editing configure.ac"
+mv -f t configure.ac
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
@@ -67,8 +68,9 @@ $MAKE distclean
 
 : 'Enable by default in configure.ac, disable by default in config.site'
 
-sed 's/^AM_SILENT_RULES/&([yes])/' configure.ac > configure.tmp
-mv -f configure.tmp configure.ac
+sed 's/.*AM_SILENT_RULES.*/AM_SILENT_RULES([yes])/' configure.ac > t
+diff t configure.ac && fatal_ "editing configure.ac"
+mv -f t configure.ac
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
diff --git a/t/silent-lex.sh b/t/silent-lex.sh
index 2838d6e..0e7bca5 100755
--- a/t/silent-lex.sh
+++ b/t/silent-lex.sh
@@ -22,7 +22,6 @@ required=lex
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AM_PROG_CC_C_O
 AC_PROG_LEX
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/silent-many-gcc.sh b/t/silent-many-gcc.sh
index 8b457ca..8ad0720 100755
--- a/t/silent-many-gcc.sh
+++ b/t/silent-many-gcc.sh
@@ -95,7 +95,6 @@ do_and_check_verbose_build ()
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AM_PROG_CC_C_O
 AC_PROG_CXX
 AC_PROG_F77
diff --git a/t/silent-many-generic.sh b/t/silent-many-generic.sh
index 3949009..cd37672 100755
--- a/t/silent-many-generic.sh
+++ b/t/silent-many-generic.sh
@@ -96,7 +96,6 @@ do_and_check_verbose_build ()
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AM_PROG_CC_C_O
 AC_PROG_F77
 AC_PROG_FC
diff --git a/t/silent-nowarn.sh b/t/silent-nowarn.sh
deleted file mode 100755
index 5a547bc..0000000
--- a/t/silent-nowarn.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Check that the 'silent-rules' mode suppresses the warnings for recursive
-# make variable expansions.  This should happen regardless of whether and
-# where these warnings are requested.
-
-. ./defs || Exit 1
-
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-# Yes, we repeat the warnings two times, both before and after
-# 'silent-rules'.  This is deliberate.
-AM_INIT_AUTOMAKE([gnu -Wall -Wportability-recursive
-                      silent-rules
-                      -Wall -Wportability-recursive])
-AC_CONFIG_FILES([Makefile])
-END
-
-cat > Makefile.am <<'END'
-AUTOMAKE_OPTIONS = gnu -Wall -Wportability-recursive
-foo = $($(v)) $(x$(v)) $($(v)x) $(y$(v)z)
-END
-
-# Files required bu gnu strictness.
-touch AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS
-
-$ACLOCAL
-$AUTOMAKE --gnu -Wall -Wportability-recursive
-
-:
diff --git a/t/silent-yacc-headers.sh b/t/silent-yacc-headers.sh
index 55ba247..5f12c18 100755
--- a/t/silent-yacc-headers.sh
+++ b/t/silent-yacc-headers.sh
@@ -23,7 +23,6 @@ required=yacc
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_PROG_YACC
 AC_PROG_CC
 AC_OUTPUT
diff --git a/t/silent-yacc.sh b/t/silent-yacc.sh
index 35415bf..5cb3abc 100755
--- a/t/silent-yacc.sh
+++ b/t/silent-yacc.sh
@@ -23,7 +23,6 @@ required=yacc
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AM_PROG_CC_C_O
 AC_PROG_YACC
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/silent.sh b/t/silent.sh
index f914c44..3cdbaff 100755
--- a/t/silent.sh
+++ b/t/silent.sh
@@ -24,7 +24,6 @@ required=cc
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
 AM_PROG_CC_C_O
diff --git a/t/silent2.sh b/t/silent2.sh
index 6565a27..6270104 100755
--- a/t/silent2.sh
+++ b/t/silent2.sh
@@ -25,7 +25,6 @@ required=gcc
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
 AM_PROG_CC_C_O
diff --git a/t/silent3.sh b/t/silent3.sh
index 564a490..cb3c629 100755
--- a/t/silent3.sh
+++ b/t/silent3.sh
@@ -24,7 +24,6 @@ required='cc libtoolize'
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
 AM_PROG_AR
diff --git a/t/silent4.sh b/t/silent4.sh
index 44b7eb3..a44c718 100755
--- a/t/silent4.sh
+++ b/t/silent4.sh
@@ -25,7 +25,6 @@ required="libtoolize gcc"
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
 AM_PROG_AR
diff --git a/t/silent6.sh b/t/silent6.sh
index 280d25a..f8ad681 100755
--- a/t/silent6.sh
+++ b/t/silent6.sh
@@ -19,11 +19,12 @@
 . ./defs || Exit 1
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_OUTPUT
 EOF
 
 cat > Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = -Wno-portability-recursive
+
 my_verbose = $(my_verbose_$(V))
 my_verbose_ = $(my_verbose_$(AM_DEFAULT_VERBOSITY))
 my_verbose_0 = @echo GEN $@;
@@ -68,40 +69,4 @@ cat stdout
 grep '^ *GEN foo *$' stdout
 grep 'cp ' stdout && Exit 1
 
-$MAKE distclean
-
-$sleep
-# Things should also work with -Wall in AM_INIT_AUTOMAKE.
-cat > configure.ac <<'END'
-AC_INIT([silent6], [1.0])
-AM_INIT_AUTOMAKE([-Wall])
-AC_CONFIG_FILES([Makefile])
-END
-
-$ACLOCAL
-AUTOMAKE_fails
-$AUTOMAKE -Wno-error
-
-# AM_SILENT_RULES should turn off the warning.
-$sleep
-echo 'AM_SILENT_RULES' >> configure.ac
-$ACLOCAL
-$AUTOMAKE
-grep 'AM_V_GEN' Makefile.in
-$AUTOMAKE --force -Wno-all -Wportability
-grep 'AM_V_GEN' Makefile.in
-
-# The 'silent-rules' option to AM_INIT_AUTOMAKE should work likewise.
-$sleep
-cat > configure.ac <<'END'
-AC_INIT([silent6], [1.0])
-AM_INIT_AUTOMAKE([silent-rules])
-AC_CONFIG_FILES([Makefile])
-END
-$ACLOCAL
-$AUTOMAKE
-grep 'AM_V_GEN' Makefile.in
-$AUTOMAKE --force -Wno-all -Wportability
-grep 'AM_V_GEN' Makefile.in
-
 :
diff --git a/t/silent7.sh b/t/silent7.sh
index 02ef287..716eada 100755
--- a/t/silent7.sh
+++ b/t/silent7.sh
@@ -15,13 +15,11 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check user extensibility of silent-rules mode.
+# Aslo check that silent rules are disabled by default.
 
 . ./defs || Exit 1
 
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_OUTPUT
-EOF
+echo AC_OUTPUT >> configure.ac
 
 cat > Makefile.am <<'EOF'
 all-local: foo
@@ -41,7 +39,9 @@ $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
 
-./configure --disable-silent-rules
+# Silent rules are disabled by default, since we haven't called
+# "AM_SILENT_RULES([yes])" explicitly.
+./configure
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep 'GEN ' stdout && Exit 1
@@ -85,8 +85,4 @@ grep 'GEN ' stdout && Exit 1
 grep 'cp ' stdout
 grep 'echo ' stdout
 
-# Ensure that setting 'silent-rules' in a Makefile.am produces an error.
-echo 'AUTOMAKE_OPTIONS = silent-rules' >> Makefile.am
-AUTOMAKE_fails --force
-
 :
diff --git a/t/silent8.sh b/t/silent8.sh
index a2fdb44..f15e99f 100755
--- a/t/silent8.sh
+++ b/t/silent8.sh
@@ -19,10 +19,7 @@
 required='makeinfo-html tex texi2dvi-o dvips'
 . ./defs || Exit 1
 
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_OUTPUT
-EOF
+echo AC_OUTPUT >> configure.ac
 
 cat > Makefile.am <<'EOF'
 info_TEXINFOS = foo.texi
diff --git a/t/silent9.sh b/t/silent9.sh
index 70195a1..9b311c6 100755
--- a/t/silent9.sh
+++ b/t/silent9.sh
@@ -24,7 +24,6 @@ required='cc libtoolize'
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
 AM_PROG_CC_C_O
diff --git a/t/silentcxx-gcc.sh b/t/silentcxx-gcc.sh
index d99f1e9..fff3f91 100755
--- a/t/silentcxx-gcc.sh
+++ b/t/silentcxx-gcc.sh
@@ -24,7 +24,6 @@ required=g++
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_PROG_CXX
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
diff --git a/t/silentcxx.sh b/t/silentcxx.sh
index a41cc2d..cc111d3 100755
--- a/t/silentcxx.sh
+++ b/t/silentcxx.sh
@@ -25,7 +25,6 @@ required=c++
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_PROG_CXX
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
diff --git a/t/silentf77.sh b/t/silentf77.sh
index ce6f6a0..87fbc23 100755
--- a/t/silentf77.sh
+++ b/t/silentf77.sh
@@ -23,7 +23,6 @@ required=fortran77
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_PROG_F77
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
diff --git a/t/silentf90.sh b/t/silentf90.sh
index 8bb06b2..65a35ed 100755
--- a/t/silentf90.sh
+++ b/t/silentf90.sh
@@ -23,7 +23,6 @@ required=fortran
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_PROG_FC
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
diff --git a/t/suffix.sh b/t/suffix.sh
index f9944cb..600aedf 100755
--- a/t/suffix.sh
+++ b/t/suffix.sh
@@ -32,6 +32,8 @@ END
 
 for use_arlib in false :; do
 
+  rm -rf autom4te*.cache
+
   if $use_arlib; then
     am_warns=
     echo AM_PROG_AR >> configure.ac
@@ -40,7 +42,7 @@ for use_arlib in false :; do
     am_warns=-Wno-extra-portability
   fi
 
-  $ACLOCAL --force
+  $ACLOCAL
 
   $AUTOMAKE $am_warns -i
   grep '^ *\.c' Makefile.in # For debugging.
diff --git a/t/test-trs-recover2.sh b/t/test-trs-recover2.sh
index 9726870..a154ce7 100755
--- a/t/test-trs-recover2.sh
+++ b/t/test-trs-recover2.sh
@@ -80,16 +80,6 @@ test -r bar.trs
 grep '^PASS: foo\.test' stdout
 grep '^PASS: bar\.test' stdout
 
-: More complex interactions with "make recheck" are OK.
-chmod a-r bar.log bar.trs
-$MAKE recheck >stdout || { cat stdout; Exit 1; }
-cat stdout
-test -f bar.trs
-test -r bar.trs
-grep '^PASS: bar\.test' stdout
-grep 'foo\.test' stdout && Exit 1
-count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
-
 : Recreate by remaking the global test log.
 chmod a-r foo.trs
 rm -f test-suite.log
diff --git a/t/testsuite-recheck-speed.sh b/t/testsuite-recheck-speed.sh
new file mode 100755
index 0000000..9b37262
--- /dev/null
+++ b/t/testsuite-recheck-speed.sh
@@ -0,0 +1,99 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check performance of recheck target in the face of many failed tests.
+# FIXME: this test is not currently able to detect whether the measured
+# FIXME: performance is too low, and FAIL accordingly; it just offers an
+# FIXME: easy way to verify how effective a performance optimization is.
+
+am_parallel_tests=yes
+. ./defs || Exit 1
+
+count=5000
+
+cat >> configure.ac <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am <<END
+count_expected = $count
+TEST_EXTENSIONS = .t
+## Updated later.
+TESTS =
+END
+
+# This should ensure that our timing won't be disturbed by the time
+# that would be actually required to run any of:
+#  - the test cases
+#  - the test driver executing them
+#  - the recipe to create the final test-suite log.
+cat >> Makefile.am << 'END'
+AUTOMAKE_OPTIONS = -Wno-override
+## These should never be run.
+T_LOG_COMPILER = false
+T_LOG_DRIVER = false
+
+# The recipe of this also serves as a sanity check.
+$(TEST_SUITE_LOG):
+## For debugging.
+       @echo "RE-RUN:"; for i in $(TEST_LOGS); do echo "  $$i"; done
+## All the test cases should have been re-run.
+       @count_got=`for i in $(TEST_LOGS); do echo $$i; done | wc -l` \
+         && echo "Count expected: $(count_expected)" \
+         && echo "Count obtained: $$count_got" \
+         && test $$count_got -eq $(count_expected)
+## Pre-existing log files of the tests to re-run should have been
+## removed by the 'recheck' target
+       @for i in $(TEST_LOGS); do \
+         test ! -f $$i.log || { echo "$$i.log exists!"; exit 1; }; \
+       done
+## Actually create the target file, for extra safety.
+       @echo dummy > $@
+END
+
+# Updated later.
+: > all
+
+# Temporarily disable shell traces, to avoid bloating the log file.
+set +x
+
+for i in `seq_ 1 $count`; do
+  echo dummy $i > $i.log
+  echo :global-test-result: PASS > $i.trs
+  echo :test-result: PASS >> $i.trs
+  echo :recheck: yes >> $i.trs
+  echo TESTS += $i.t >> Makefile.am
+  echo $i >> all
+done
+
+# Re-enable shell traces.
+set -x
+
+# So that we don't need to create a ton of dummy tests.
+echo '$(TESTS):' >> Makefile.am
+
+head -n 100 Makefile.am || : # For debugging.
+tail -n 100 Makefile.am || : # Likewise.
+cat $count.trs               # Likewise, just the last specimen though.
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE recheck
+
+:
diff --git a/t/testsuite-summary-count-many.sh 
b/t/testsuite-summary-count-many.sh
index 58157ad..ff38097 100755
--- a/t/testsuite-summary-count-many.sh
+++ b/t/testsuite-summary-count-many.sh
@@ -56,9 +56,7 @@ $PERL -w -e '
   use warnings FATAL => "all";
   use strict;
 
-  # FIXME: we would like this to be 1000 or even 10000, but the current
-  # implementation is too slow to handle that :-(
-  my $base = 5;
+  my $base = 1000;
   my %count = (
     TOTAL => $base * 1000,
     PASS  => $base * 700,
diff --git a/t/testsuite-summary-speed.sh b/t/testsuite-summary-speed.sh
new file mode 100755
index 0000000..4d18c61
--- /dev/null
+++ b/t/testsuite-summary-speed.sh
@@ -0,0 +1,76 @@
+#! /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 performanceof recipe generating test-suite.log file and testsuite
+# summary.  That has suffered of huge inefficiencies in the past.
+# FIXME: this test is not currently able to detect whether the measured
+# FIXME: performance is too low, and FAIL accordingly; it just offers
+# FIXME: an easy way verify how effective a performance optimization is.
+
+am_parallel_tests=yes
+. ./defs || Exit 1
+
+count=10000
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am <<'END'
+TEST_EXTENSIONS = .t
+## Will be updated later.
+TESTS =
+## None of these should ever be run.
+T_LOG_COMPILER = false
+T_LOG_DRIVER = false
+END
+
+# Temporarily disable shell traces, to avoid bloating the log file.
+set +x
+
+for i in `seq_ 1 $count`; do
+  echo false > $i.t
+  echo dummy $i > $i.log
+  echo :global-test-result: PASS > $i.trs
+  echo :test-result: PASS >> $i.trs
+  echo :copy-in-global-log: yes >> $i.trs
+  echo TESTS += $i.t
+done >> Makefile.am 
+
+# Re-enable shell traces.
+set -x
+
+head -n 100 Makefile.am || : # For debugging.
+tail -n 100 Makefile.am || : # Likewise.
+cat $count.trs               # Likewise, just the last specimen though.
+
+# So that we don't need to create a ton of dummy tests.
+#echo '$(TESTS):' >> Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE test-suite.log >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+# Sanity checks.
+grep "^# TOTAL: $count$" stdout
+grep "^dummy $count$" test-suite.log
+specimen=347 # Could be any number <= $count.
+grep "^dummy $specimen$" test-suite.log
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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