From: Ralf Wildenhues Date: Tue, 10 Mar 2009 21:59:00 +0000 (+0100) Subject: Keep `--silent-rules' across triggered automake reruns. X-Git-Tag: v1.10b~7^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c65e06621b259081fa79b900c2872c8df471f89f;p=thirdparty%2Fautomake.git Keep `--silent-rules' across triggered automake reruns. * automake.in (usage): Reformat to be a bit clearer. (handle_configure): Remove substitutions %STRICTNESS% and %USE-DEPS% in favor of a new substitution %AUTOMAKE-OPTIONS% that carries over all needed flags. * lib/am/configure.am (%MAKEFILE-IN%): Adjust rule. * tests/flavor.test: New test, to ensure --$flavor (gnu, gnits, foreign, cygnus), --ignore-deps, and --silent-rules are preserved across automake reruns. * tests/Makefile.am: Update. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index fdb36483f..04d722b76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2009-03-10 Ralf Wildenhues + + Keep `--silent-rules' across triggered automake reruns. + * automake.in (usage): Reformat to be a bit clearer. + (handle_configure): Remove substitutions %STRICTNESS% and + %USE-DEPS% in favor of a new substitution %AUTOMAKE-OPTIONS% + that carries over all needed flags. + * lib/am/configure.am (%MAKEFILE-IN%): Adjust rule. + * tests/flavor.test: New test, to ensure --$flavor (gnu, + gnits, foreign, cygnus), --ignore-deps, and --silent-rules are + preserved across automake reruns. + * tests/Makefile.am: Update. + 2009-03-09 Ralf Wildenhues Provide variables for silencing of user rules. diff --git a/Makefile.in b/Makefile.in index 09580595e..1cdf70cb4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -263,15 +263,15 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile + $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/automake.in b/automake.in index 7286a4452..fac2313a3 100755 --- a/automake.in +++ b/automake.in @@ -4174,6 +4174,10 @@ sub handle_configure ($$$@) define_pretty_variable ('am__configure_deps', TRUE, INTERNAL, @configuredeps); + my $automake_options = '--' . (global_option 'cygnus' ? 'cygnus' : $strictness_name) + . (global_option 'no-dependencies' ? ' --ignore-deps' : '') + . (global_option 'silent' ? ' --silent-rules' : ''); + $output_rules .= file_contents ('configure', new Automake::Location, @@ -4183,10 +4187,7 @@ sub handle_configure ($$$@) 'MAKEFILE-IN' => $rel_makefile_in, 'MAKEFILE-IN-DEPS' => "@include_stack", 'MAKEFILE-AM' => $rel_makefile_am, - STRICTNESS => global_option 'cygnus' - ? 'cygnus' : $strictness_name, - 'USE-DEPS' => global_option 'no-dependencies' - ? ' --ignore-deps' : '', + 'AUTOMAKE-OPTIONS' => $automake_options, 'MAKEFILE-AM-SOURCES' => "$makefile$colon_infile", 'REGEN-ACLOCAL-M4' => $regen_aclocal_m4, VERBOSE => verbose_flag ('GEN')); @@ -8029,12 +8030,14 @@ Dependency tracking: -i, --ignore-deps disable dependency tracking code --include-deps enable dependency tracking code +Verbosity of generated rules: + --silent-rules enable silent build rules + Flavors: --cygnus assume program is part of Cygnus-style tree --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 diff --git a/doc/Makefile.in b/doc/Makefile.in index befd9b1f6..61915de70 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -238,9 +238,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu doc/Makefile + $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in index aa647c5e6..ce768a90d 100644 --- a/lib/Automake/Makefile.in +++ b/lib/Automake/Makefile.in @@ -251,9 +251,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Automake/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Automake/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/Automake/Makefile + $(AUTOMAKE) --gnu lib/Automake/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in index b663fc446..b3cc49ce5 100644 --- a/lib/Automake/tests/Makefile.in +++ b/lib/Automake/tests/Makefile.in @@ -176,9 +176,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Automake/tests/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Automake/tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/Automake/tests/Makefile + $(AUTOMAKE) --gnu lib/Automake/tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/lib/Makefile.in b/lib/Makefile.in index b6f9f1d96..b85109da4 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -226,9 +226,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/Makefile + $(AUTOMAKE) --gnu lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in index ea62647ed..40db91825 100644 --- a/lib/am/Makefile.in +++ b/lib/am/Makefile.in @@ -218,9 +218,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/am/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/am/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/am/Makefile + $(AUTOMAKE) --gnu lib/am/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/lib/am/configure.am b/lib/am/configure.am index e24e9a6cb..f88665cbe 100644 --- a/lib/am/configure.am +++ b/lib/am/configure.am @@ -1,6 +1,6 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007, 2008 Free Software -## Foundation, Inc. +## Copyright (C) 2001, 2002, 2003, 2004, 2006, 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 @@ -39,8 +39,8 @@ endif %?TOPDIR_P% @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ -?TOPDIR_P? echo ' cd $(srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS%'; \ -?TOPDIR_P? $(am__cd) $(srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% \ +?TOPDIR_P? echo ' cd $(srcdir) && $(AUTOMAKE) %AUTOMAKE-OPTIONS%'; \ +?TOPDIR_P? $(am__cd) $(srcdir) && $(AUTOMAKE) %AUTOMAKE-OPTIONS% \ ?TOPDIR_P? && exit 0; \ ?!TOPDIR_P? ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ ## If on the other hand, subdir/Makefile.in has been removed, then toplevel @@ -52,9 +52,9 @@ endif %?TOPDIR_P% esac; \ done; \ ## Otherwise, rebuild only this file. - echo ' cd $(top_srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES%'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) %AUTOMAKE-OPTIONS% %MAKEFILE-AM-SOURCES%'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES% + $(AUTOMAKE) %AUTOMAKE-OPTIONS% %MAKEFILE-AM-SOURCES% ## Ensure that GNU make doesn't remove Makefile if ./config.status (below) ## is interrupted. Otherwise, the user would need to know to rerun diff --git a/m4/Makefile.in b/m4/Makefile.in index f9f1adb83..808c253ff 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -215,9 +215,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu m4/Makefile + $(AUTOMAKE) --gnu m4/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 2197a110f..c8e1c4049 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -266,6 +266,7 @@ extra5.test \ extra6.test \ extra7.test \ f90only.test \ +flavor.test \ flibs.test \ fn99.test \ fn99subdir.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index ddd73bd06..da9c3bc6c 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -421,6 +421,7 @@ extra5.test \ extra6.test \ extra7.test \ f90only.test \ +flavor.test \ flibs.test \ fn99.test \ fn99subdir.test \ @@ -857,9 +858,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/Makefile + $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/tests/flavor.test b/tests/flavor.test new file mode 100755 index 000000000..6c4756ba5 --- /dev/null +++ b/tests/flavor.test @@ -0,0 +1,61 @@ +#! /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 . + +# Make sure flavors like `cygnus', `gnu', `gnits' and command line +# options like `--ignore-deps' and `--silent-rules' are preserved across +# automake reruns. + +. ./defs || Exit 1 + +set -e + +cat >> configure.in << 'END' +AM_MAINTAINER_MODE +AC_OUTPUT +END + +: > Makefile.am +: > NEWS +: > README +: > AUTHORS +: > ChangeLog +: > THANKS + +$ACLOCAL +$AUTOCONF +# Order flavors so that all needed files are installed early. +for flavor in --gnits --gnu --foreign --cygnus --ignore-deps --silent-rules +do + $AUTOMAKE --add-missing $flavor + ./configure --enable-maintainer-mode + grep " $flavor" Makefile + $MAKE + + # Two code paths in configure.am: + # - either a file in $(am__configure_deps) has been updated ... + $sleep + touch aclocal.m4 + $MAKE + grep " $flavor" Makefile + + # - ... or not; i.e., Makefile.am or an included file has. + $sleep + touch Makefile.am + $MAKE + grep " $flavor" Makefile +done + +: