diff options
author | Alexandre Duret-Lutz <adl@gnu.org> | 2005-08-07 09:56:09 +0000 |
---|---|---|
committer | Alexandre Duret-Lutz <adl@gnu.org> | 2005-08-07 09:56:09 +0000 |
commit | 255cc3043738a4387bee225e84b8a308a7987043 (patch) | |
tree | 262377d57b06504a45937b417a9615ef28a5aa09 /lib/Automake/Variable.pm | |
parent | 225eee9861382a579fd47e215c505345883732aa (diff) | |
download | automake-255cc3043738a4387bee225e84b8a308a7987043.tar.gz |
* lib/Automake/Variable.pm (variable_value): Do not read the TRUE
value of a conditionally defined variable.
Report from Juergen Leising.
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 e6c98c032..1befbd0d9 100644 --- a/lib/Automake/Variable.pm +++ b/lib/Automake/Variable.pm @@ -1180,7 +1180,7 @@ sub requires_variables ($$@) Get the C<TRUE> value of a variable, warn if the variable is conditionally defined. C<$var> can be either a variable name -or a C<Automake::Variable> instance (this allows to calls sucha +or a C<Automake::Variable> instance (this allows calls such as C<$var-E<gt>variable_value>). =cut @@ -1191,7 +1191,8 @@ sub variable_value ($) my $v = ref ($var) ? $var : var ($var); return () unless $v; $v->check_defined_unconditionally; - return $v->rdef (TRUE)->value; + my $d = $v->def (TRUE); + return $d ? $d->value : ""; } =item C<$str = output_variables> |