* 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>
+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.
@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 \
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,
'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'));
-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
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 \
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 \
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 \
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 \
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 \
## 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
@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
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
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 \
extra6.test \
extra7.test \
f90only.test \
+flavor.test \
flibs.test \
fn99.test \
fn99subdir.test \
extra6.test \
extra7.test \
f90only.test \
+flavor.test \
flibs.test \
fn99.test \
fn99subdir.test \
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 \
--- /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/>.
+
+# 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
+
+: