GNU bug report logs -
#8665
automake should offer APIs to honour silent-rules verbosity from shell code in Makefiles
Previous Next
Full log
Message #26 received at 8665 <at> debbugs.gnu.org (full text, mbox):
This is only required by future changes.
* automake.in (define_verbose_var): Accept a third optional argument,
specifying the value to assign to the given make variable when silent
rules are disabled.
Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
---
automake.in | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/automake.in b/automake.in
index 5cf5a2c..5d777c1 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' mode, 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' mode, 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';
if (option 'silent-rules')
{
# For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V)
@@ -1155,10 +1159,13 @@ sub define_verbose_var ($$)
# See AM_SILENT_RULES in m4/silent.m4.
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.
--
1.7.9.5
This bug report was last modified 13 years and 6 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.