Hash :
14141f25
Author :
Date :
2012-05-01T14:23:04
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 <stefano.lattarini@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
#!/bin/sh
# Copyright (C) 2010-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 user can control default mode of silent-rules
# from config.site, and that this default can be overridden from
# either the ./configure or make command line.
. ./defs || Exit 1
cat >> configure.ac <<'EOF'
# This line will be edited later to force silent-rules default.
AC_OUTPUT
EOF
cat > Makefile.am <<'EOF'
.PHONY: test-silent test-nosilent
test-silent:
test x'$(AM_DEFAULT_VERBOSITY)' = x'0'
test-nosilent:
test x'$(AM_DEFAULT_VERBOSITY)' = x'1'
EOF
unset enable_silent_rules || :
: 'No explicit default in configure.ac, enable by default in config.site'
$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
echo "enable_silent_rules=\${enable_silent_rules-yes}" > config.site
CONFIG_SITE=./config.site ./configure
$MAKE test-silent
$MAKE distclean
# Command line should win over default values in config.site.
CONFIG_SITE=./config.site ./configure --disable-silent-rules
$MAKE test-nosilent
$MAKE distclean
: 'Disable by default in configure.ac, enable by default in config.site'
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
echo "enable_silent_rules=\${enable_silent_rules-yes}" > config.site
CONFIG_SITE=./config.site ./configure
$MAKE test-silent
# Command line should win over default values in config.site.
$MAKE distclean
CONFIG_SITE=./config.site ./configure --disable-silent-rules
$MAKE test-nosilent
$MAKE distclean
: 'Enable by default in configure.ac, disable by default in config.site'
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
echo "enable_silent_rules=\${enable_silent_rules-no}" > config.site
CONFIG_SITE=./config.site ./configure
$MAKE test-nosilent
$MAKE distclean
# Command line should win over default values in config.site.
CONFIG_SITE=./config.site ./configure --enable-silent-rules
$MAKE test-silent
$MAKE distclean
: