[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/4] New automake command line option `--silent-rules'.
From: |
Ralf Wildenhues |
Subject: |
Re: [PATCH 4/4] New automake command line option `--silent-rules'. |
Date: |
Tue, 10 Mar 2009 23:11:36 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
* Ralf Wildenhues wrote on Sun, Mar 08, 2009 at 10:46:40AM CET:
> 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.
First bugfix of this patch: --silent-rules should be retained across
triggered automake reruns. Pushed to the branch.
Cheers,
Ralf
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.
diff --git a/automake.in b/automake.in
index 7286a44..fac2313 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/lib/am/configure.am b/lib/am/configure.am
index e24e9a6..f88665c 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/tests/Makefile.am b/tests/Makefile.am
index 2197a11..c8e1c40 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/flavor.test b/tests/flavor.test
new file mode 100755
index 0000000..6c4756b
--- /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 <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
+
+:
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., (continued)
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., Jan Engelhardt, 2009/03/09
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., Raja R Harinath, 2009/03/09
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., Ralf Wildenhues, 2009/03/09
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., Ralf Corsepius, 2009/03/10
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., Jan Engelhardt, 2009/03/10
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., Ralf Wildenhues, 2009/03/10
- Re: [PATCH 4/4] New automake command line option `--silent-rules'., Ralf Wildenhues, 2009/03/11
Re: [PATCH 4/4] New automake command line option `--silent-rules'., Jim Meyering, 2009/03/10
Re: [PATCH 4/4] New automake command line option `--silent-rules'.,
Ralf Wildenhues <=
Re: [PATCH 4/4] New automake command line option `--silent-rules'., Ralf Wildenhues, 2009/03/11