]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Keep `--silent-rules' across triggered automake reruns.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 10 Mar 2009 21:59:00 +0000 (22:59 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 10 Mar 2009 22:02:33 +0000 (23:02 +0100)
* 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 <Ralf.Wildenhues@gmx.de>
13 files changed:
ChangeLog
Makefile.in
automake.in
doc/Makefile.in
lib/Automake/Makefile.in
lib/Automake/tests/Makefile.in
lib/Makefile.in
lib/am/Makefile.in
lib/am/configure.am
m4/Makefile.in
tests/Makefile.am
tests/Makefile.in
tests/flavor.test [new file with mode: 0755]

index fdb36483f4cb3799cef95e5c9c646ded4a2a5df4..04d722b76a0c7200d1247f00ccd033f2271aeda1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-03-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       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  <Ralf.Wildenhues@gmx.de>
 
        Provide variables for silencing of user rules.
index 09580595e651b8b11078c474f0a49c042db1693c..1cdf70cb42fd8ad3f48b2b0a76444b99941d522c 100644 (file)
@@ -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 \
index 7286a445281c723975cd10a1fe69196cfbb82344..fac2313a3d8f9bf1bb81b3219f29dd2f140bd80c 100755 (executable)
@@ -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
index befd9b1f66169655e5057ad461f531c9b7a746ea..61915de707b2f2b559351b454f21e91f47bd0a7e 100644 (file)
@@ -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 \
index aa647c5e632ff1a1ddc2287387fe2da80986412b..ce768a90d1d7d553d9e6e6765ce49eb8989154c5 100644 (file)
@@ -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 \
index b663fc44673a6276db1b0667927fc0dbce02c5db..b3cc49ce52209b7b2677b88dba0813de0593bd28 100644 (file)
@@ -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 \
index b6f9f1d96563a12becc13fdf288f76c30a8c676e..b85109da498a512c967a4543a941a3ba495c80df 100644 (file)
@@ -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 \
index ea62647ed9de0396584e8bfb14f6c66284e84db4..40db91825d28ccc7970a92193b19d91d966085cb 100644 (file)
@@ -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 \
index e24e9a6cbd6641fa05522271dbdde65e262f11d5..f88665cbe6a0b537450593730a367fca43459184 100644 (file)
@@ -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
index f9f1adb83df4dfb81b463294bfc34215ef331d6b..808c253ff45d1754fb12a2bc57e1be0159da7c30 100644 (file)
@@ -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 \
index 2197a110f90ab98d33615ec63a05637fbf8cfe55..c8e1c40499a0b70f7ffda8911198c9f613db9951 100644 (file)
@@ -266,6 +266,7 @@ extra5.test \
 extra6.test \
 extra7.test \
 f90only.test \
+flavor.test \
 flibs.test \
 fn99.test \
 fn99subdir.test \
index ddd73bd06549e38fb66613b2532dfe9602bf9a41..da9c3bc6cfc18b189d98191c94f7c6d59e2606e3 100644 (file)
@@ -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 (executable)
index 0000000..6c4756b
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+
+# 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
+
+: