2009-03-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ New automake command line option `--silent-rules'.
+ * automake.in (parse_arguments): Accept `--silent-rules; let it
+ override command line warning settings.
+ (usage): Document it.
+ * doc/automake.texi (Invoking Automake): Document it.
+ * NEWS: Update.
+ * tests/dollarvar.test: Also test `--silent-rules'.
+ * tests/pr300-ltlib.test: Use `$MAKE V=1' to enable verbose
+ output, which is matched later in the test.
+ * tests/silent6.test: New test.
+ * tests/Makefile.am: Update.
+
Documentation and tests for the `silent' option.
* NEWS: Update.
* doc/automake.texi (Invoking Automake): `silent' turns off some
This option requires the widely supported but non-POSIX `make' feature
of recursive variable expansion, so do not use it if your package needs
to build with `make' implementations that do not support it.
+ Besides the normal option setting methods, it can also be enabled
+ globally by the new automake option `--silent-rules'.
- New prefix `notrans_' for manpages which should not be transformed
by --program-transform.
--foreign set strictness to foreign
--gnits set strictness to gnits
--gnu set strictness to gnu
+ --silent-rules enable silent build rules
Library files:
-a, --add-missing add missing standard files to package
'f|force-missing' => \$force_missing,
'o|output-dir=s' => \$output_directory,
'a|add-missing' => \$add_missing,
- 'c|copy' => \$copy_missing,
+ 'c|copy' => \$copy_missing,
+ 'silent-rules' => sub { set_global_option ('silent', $cli_where); },
'v|verbose' => sub { setup_channel 'verb', silent => 0; },
'W|warnings=s' => \&parse_warnings,
# These long options (--Werror and --Wno-error) for backward
$output_directory = '.';
}
+ # Override portability-recursive warning.
+ process_global_option_list ($cli_where, 'silent')
+ if global_option 'silent';
+
return unless @ARGV;
if ($ARGV[0] =~ /^-./)
corresponding @file{Makefile.am}. This option is deprecated and will be
removed in a future release.
+@item --silent-rules
+@opindex --silent-rules
+Enable the @option{silent} option globally (@pxref{Options}).
+
@item -v
@itemx --verbose
@opindex -v
silent3.test \
silent4.test \
silent5.test \
+silent6.test \
sinclude.test \
srcsub.test \
srcsub2.test \
silent3.test \
silent4.test \
silent5.test \
+silent6.test \
sinclude.test \
srcsub.test \
srcsub2.test \
# On the other hand, if we allow `silent' mode, then we need to allow
# recursive variable expansion, too.
+# This should work with the `--silent-rules' command line switch.
+AUTOMAKE_fails -Wportability --silent-rules
+grep 'Makefile.am:2' stderr
+grep 'Makefile.am:3' stderr
+grep 'Makefile.am:4' stderr
+grep 'Makefile.am:5' stderr
+grep 'Makefile.am:6' stderr && Exit 1
+grep 'Makefile.am:7' stderr && Exit 1
+
# This should work with AUTOMAKE_OPTIONS.
echo 'AUTOMAKE_OPTIONS = silent' >> Makefile.am
#! /bin/sh
-# Copyright (C) 2002, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2008, 2009 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
$AUTOCONF
$AUTOMAKE --copy --add-missing
./configure --prefix "`pwd`/inst"
-$MAKE >stdout
+$MAKE V=1 >stdout
cat stdout
grep 'liba.la .*-rpath .*lib' stdout
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, 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 user extensibility of silent mode.
+
+. ./defs
+
+set -e
+
+cat >>configure.in <<'EOF'
+# Layering violation: this conditional should be decided
+# by the package author, not the user. We just do it here
+# for testing convenience.
+AM_CONDITIONAL([SILENT], [test "$silent_rules" = yes])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+if SILENT
+my_verbose = $(my_verbose_$V)
+my_verbose_ = $(my_verbose_0)
+my_verbose_0 = @echo GEN $@;
+endif
+
+all-local: foo
+
+foo: foo.in
+ $(my_verbose)cp $(srcdir)/foo.in $@
+EXTRA_DIST = foo.in
+CLEANFILES = foo
+EOF
+
+: >foo.in
+
+$ACLOCAL
+# FIXME: it should not be necessary to disable Wportability here.
+$AUTOMAKE --add-missing -Wno-portability --silent-rules
+$AUTOCONF
+
+./configure silent_rules=yes
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'GEN foo' stdout
+grep 'cp ' stdout && Exit 1
+
+$MAKE clean
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'GEN foo' stdout && Exit 1
+grep 'cp ' stdout
+
+$MAKE distclean
+
+./configure silent_rules=no
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'GEN foo' stdout && Exit 1
+grep 'cp ' stdout
+
+: