summaryrefslogtreecommitdiff
path: root/automake.in
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-06-15 10:27:27 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-06-15 10:36:41 +0200
commit7b1697bd9b600cec62b8d52c56d80c60d39108a7 (patch)
tree3f336110f7e928320ab5cb0be612d8b6c6c60189 /automake.in
parent2ef0a2d367b4db6ca77ff5b8e5f504bdbdbd18de (diff)
parentdb16f500f9176e2da49c46302dbf6d44f2cce2fb (diff)
downloadautomake-7b1697bd9b600cec62b8d52c56d80c60d39108a7.tar.gz
Merge branch 'maint'
* maint: tests: minor reorganization of few tests fixup: adjust t/list-of-tests.mk for renamed/added tests subdirs: enhance coverage, tweak and rename few tests sync: update files from upstream with "make fetch" py-compile: consistently quote 'like this', not `like this'. docs: recursive make considered harmful docs: clean rules are not run in reverse order of build rules anymore silent: new $(AM_V_P) variable, tell if we're running in silent mode refactor: silent rules handling (a little) refactor: &define_verbose_var: accept a third optional argument + Extra non-trivial edits: These are due to the fact that support for silent rules is enabled unconditionally these days (since commit 'v1.12-34-g14141f2' of 2012-05-01, "silent rules: support for them is always active now"). * automake.in: In the new silent related code, do not ever check whether the 'silent-rules' option is active; just assume support for silent rules is enabled. * t/silent-obsolescent-warns.sh: Remove as obsolete. * t/list-of-tests.mk: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'automake.in')
-rw-r--r--automake.in43
1 files changed, 31 insertions, 12 deletions
diff --git a/automake.in b/automake.in
index e5f95ee64..373e25949 100644
--- a/automake.in
+++ b/automake.in
@@ -1138,15 +1138,19 @@ sub verbose_private_var ($)
return 'am__v_' . $name;
}
-# define_verbose_var (NAME, VAL)
-# ------------------------------
-# For silent rules, setup VAR and dispatcher, to expand to VAL if silent.
-sub define_verbose_var ($$)
-{
- my ($name, $val) = @_;
+# define_verbose_var (NAME, VAL-IF-SILENT, [VAL-IF-VERBOSE])
+# ----------------------------------------------------------
+# For silent rules, setup VAR and dispatcher, to expand to
+# VAL-IF-SILENT if silent, to VAL-IF-VERBOSE (defaulting to
+# empty) if not.
+sub define_verbose_var ($$;$)
+{
+ my ($name, $silent_val, $verbose_val) = @_;
+ $verbose_val = '' unless defined $verbose_val;
my $var = verbose_var ($name);
my $pvar = verbose_private_var ($name);
my $silent_var = $pvar . '_0';
+ my $verbose_var = $pvar . '_1';
# For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V)
# and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY).
# For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead.
@@ -1154,9 +1158,12 @@ sub define_verbose_var ($$)
define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL);
define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)',
INTERNAL);
- Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE, $val,
- '', INTERNAL, VAR_ASIS)
+ Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE,
+ $silent_val, '', INTERNAL, VAR_ASIS)
if (! vardef ($silent_var, TRUE));
+ Automake::Variable::define ($verbose_var, VAR_AUTOMAKE, '', TRUE,
+ $verbose_val, '', INTERNAL, VAR_ASIS)
+ if (! vardef ($verbose_var, TRUE));
}
# Above should not be needed in the general automake code.
@@ -1191,7 +1198,6 @@ sub define_verbose_tagvar ($)
{
my ($name) = @_;
define_verbose_var ($name, '@echo " '. $name . ' ' x (8 - length ($name)) . '" $@;');
- define_verbose_var ('at', '@');
}
# define_verbose_texinfo
@@ -1217,6 +1223,20 @@ sub define_verbose_libtool ()
return verbose_flag ('lt');
}
+sub handle_silent ()
+{
+ # Define "$(AM_V_P)", expanding to a shell conditional that can be
+ # used in make recipes to determine whether we are being run in
+ # silent mode or not. The choice of the name derives from the LISP
+ # convention of appending the letter 'P' to denote a predicate (see
+ # also "the '-P' convention" in the Jargon File); we do so for lack
+ # of a better convention.
+ define_verbose_var ('P', 'false', ':');
+ # *Always* provide the user with '$(AM_V_GEN)', unconditionally.
+ define_verbose_tagvar ('GEN');
+ define_verbose_var ('at', '@');
+}
+
################################################################
@@ -1570,9 +1590,6 @@ sub handle_languages
unless defined $done{$languages{'c'}};
define_linker_variable ($languages{'c'});
}
-
- # Always provide the user with 'AM_V_GEN' for silent rules.
- define_verbose_tagvar ('GEN');
}
@@ -8000,6 +8017,8 @@ sub generate_makefile ($$)
handle_programs;
handle_scripts;
+ handle_silent;
+
# These must be run after all the sources are scanned. They
# use variables defined by &handle_libraries, &handle_ltlibraries,
# or &handle_programs.