summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS11
-rw-r--r--automake.in62
-rw-r--r--configure.ac2
-rw-r--r--doc/automake.texi105
-rw-r--r--lib/Automake/Options.pm5
-rw-r--r--m4/init.m42
-rwxr-xr-xt/compile_f_c_cxx.sh6
-rwxr-xr-xt/dollarvar.sh11
-rwxr-xr-xt/help-silent.sh19
-rw-r--r--t/list-of-tests.mk2
-rwxr-xr-xt/silent-amopts.sh28
-rwxr-xr-xt/silent-configsite.sh12
-rwxr-xr-xt/silent-lex.sh1
-rwxr-xr-xt/silent-many-gcc.sh1
-rwxr-xr-xt/silent-many-generic.sh1
-rwxr-xr-xt/silent-nowarn.sh44
-rwxr-xr-xt/silent-yacc-headers.sh1
-rwxr-xr-xt/silent-yacc.sh1
-rwxr-xr-xt/silent.sh1
-rwxr-xr-xt/silent2.sh1
-rwxr-xr-xt/silent3.sh1
-rwxr-xr-xt/silent4.sh1
-rwxr-xr-xt/silent6.sh39
-rwxr-xr-xt/silent7.sh14
-rwxr-xr-xt/silent8.sh5
-rwxr-xr-xt/silent9.sh1
-rwxr-xr-xt/silentcxx-gcc.sh1
-rwxr-xr-xt/silentcxx.sh1
-rwxr-xr-xt/silentf77.sh1
-rwxr-xr-xt/silentf90.sh1
30 files changed, 96 insertions, 285 deletions
diff --git a/NEWS b/NEWS
index e7570d0b3..b56cd3d5f 100644
--- a/NEWS
+++ b/NEWS
@@ -60,6 +60,17 @@ New in 1.12.1:
m4 macro are deprecated, eliciting a warning in the 'obsolete'
category. They will be removed in the next major version (1.13).
+* 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 will not disable
+ the warnings in the 'portability-recursive' category anymore.
+
Bugs fixed in 1.12.1:
* Bugs introduced by 1.12:
diff --git a/automake.in b/automake.in
index a99345140..9f358ae98 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');
}
@@ -5213,7 +5200,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,
@@ -5413,10 +5399,6 @@ EOF
{
$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 bda032863..80eb1bfa7 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 c21a5b7e0..5bfc5f5b7 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -359,9 +359,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
@@ -2712,8 +2712,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},
@@ -4058,7 +4056,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
@@ -5480,9 +5479,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
-@command{libtool} can also be influenced with the Automake
-@option{silent-rules} option (@pxref{Options}).
-
+@command{libtool} 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}
@@ -10167,23 +10165,6 @@ non-alpha releases. The second form is
@samp{@var{major}.@var{minor}@var{alpha}}, where @var{alpha} is a
letter; it should be omitted for non-alpha releases.
-@item @option{silent-rules}
-@cindex Option, @option{silent-rules}
-@opindex silent-rules
-Enable less verbose build rules. This can be used to let build rules
-output status lines of the form:
-@example
-GEN @var{output-file}
- CC @var{object-file}
-@end example
-@noindent
-instead of printing the command that will be executed to update
-@var{output-file} 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}
@@ -10665,9 +10646,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
@@ -10702,8 +10683,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
@@ -10755,20 +10736,19 @@ automatically activated if the @option{-s} flag is used.
@end itemize
-@node Automake silent-rules Option
+@node 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:
@@ -10817,7 +10797,7 @@ func.c:4:3: warning: ā€˜iā€™ used uninitialized in this function
CCLD foo
@end example
-@cindex silent-rules and libtool
+@cindex 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:
@@ -10843,26 +10823,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:
-
-@itemize @bullet
-@item
-Add the @option{silent-rules} option as argument to @code{AM_INIT_AUTOMAKE}.
-@item
-Call the @code{AM_SILENT_RULES} macro from within the @file{configure.ac}
-file.
-@end itemize
-
-It is not possible to instead specify @option{silent-rules} in a
-@file{Makefile.am} 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
@@ -10878,17 +10841,16 @@ time may be overridden: @code{make V=1} will produce verbose output,
@code{make V=0} less verbose output.
@end itemize
-@cindex default verbosity for silent-rules
+@cindex 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
-@file{configure.ac}. 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
@@ -10901,16 +10863,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
-@option{-Wportability} (@pxref{automake Invocation}). 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
+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}
@@ -12980,8 +12939,8 @@ generated by @command{automake} effectively:
@itemize
@item
-If less verbose output has been enabled in the package with the
-@samp{silent-rules} 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 2f977bd54..af0e22033 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -287,6 +287,7 @@ sub _is_valid_easy_option ($)
no-texinfo.tex
nostdinc
readme-alpha
+ silent-rules
std-options
subdir-objects
);
@@ -338,10 +339,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/m4/init.m4 b/m4/init.m4
index 3520dcb77..97315279f 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/compile_f_c_cxx.sh b/t/compile_f_c_cxx.sh
index 99893d8c3..2f093ba62 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 940ef23db..f39fc851d 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 d5fc34225..aaa6b6a6c 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 d69256113..b8651a709 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -965,10 +965,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/silent-amopts.sh b/t/silent-amopts.sh
deleted file mode 100755
index f71ad13bb..000000000
--- 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 813753b74..d8c2b3322 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 2838d6e80..0e7bca589 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 8b457caaf..8ad07205a 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 394900978..cd376721a 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 5a547bc13..000000000
--- 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 55ba24700..5f12c186a 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 35415bfb0..5cb3abc0c 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 f914c445c..3cdbaff3f 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 6565a2701..627010475 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 564a49001..cb3c6297f 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 44b7eb3a0..a44c71885 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 280d25a1b..f8ad681d4 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 02ef287de..716eadaad 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 a2fdb44c1..f15e99f99 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 70195a1a8..9b311c66f 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 d99f1e9cf..fff3f9112 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 a41cc2d13..cc111d3ad 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 ce6f6a044..87fbc236f 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 8bb06b262..65a35ed94 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