diff options
author | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2009-10-11 13:33:43 +0200 |
---|---|---|
committer | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2009-10-11 13:36:04 +0200 |
commit | c2594bb50eb2c6f668513af07f8efafd17f37b0e (patch) | |
tree | 8063bd42cc84b0157067590476979ece41e384c7 /lib/Automake/Variable.pm | |
parent | 734beb4363d4a8d503c7c0ceabc3297972b015ed (diff) | |
download | automake-c2594bb50eb2c6f668513af07f8efafd17f37b0e.tar.gz |
Allow variable override of, rather than by, silent variables.
When overriding variables, check the VAR_SILENT status of the
old condition, not the new one: we allow non-silent overrides
of silent variables (these do not hit ordering bugs in the
automake output), but there is no use case for doing so the
other way round. Fixes conditional overrides of variables
annotated AM_SUBST_NOTMAKE in configure.ac.
* lib/Automake/Variable.pm (_check_ambiguous_condition): Check
for VAR_SILENT in $ambig_cond not $cond.
* tests/cond44.test, tests/cond45.test: New tests, analogous to
cond23.test and cond24.test.
* tests/Makefile.am: Update.
Spotted originally in binutils/bfd.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'lib/Automake/Variable.pm')
-rw-r--r-- | lib/Automake/Variable.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm index 1e24bb2ba..f0c867f65 100644 --- a/lib/Automake/Variable.pm +++ b/lib/Automake/Variable.pm @@ -466,8 +466,9 @@ sub _check_ambiguous_condition ($$$) my $var = $self->name; my ($message, $ambig_cond) = $self->conditions->ambiguous_p ($var, $cond); - # We allow silent variables to be overridden silently. - my $def = $self->def ($cond); + # We allow silent variables to be overridden silently, + # by either silent or non-silent variables. + my $def = $self->def ($ambig_cond); if ($message && !($def && $def->pretty == VAR_SILENT)) { msg 'syntax', $where, "$message ...", partial => 1; |