From 255cc3043738a4387bee225e84b8a308a7987043 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sun, 7 Aug 2005 09:56:09 +0000 Subject: [PATCH] * lib/Automake/Variable.pm (variable_value): Do not read the TRUE value of a conditionally defined variable. Report from Juergen Leising. --- ChangeLog | 4 ++++ THANKS | 1 + lib/Automake/Variable.pm | 5 +++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0a418b1..ac358f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-08-07 Alexandre Duret-Lutz + * lib/Automake/Variable.pm (variable_value): Do not read the TRUE + value of a conditionally defined variable. + Report from Juergen Leising. + * automake.in (lang_yacc_target_hook): Use AM_MAKEFLAGS in recursive $(MAKE) invocations. * lib/am/texibuild.am (?GENERIC_INFO?%SOURCE_SUFFIX%%DEST_SUFFIX%): diff --git a/THANKS b/THANKS index 0fc59f1..a27fdf3 100644 --- a/THANKS +++ b/THANKS @@ -125,6 +125,7 @@ Joshua Cowan jcowan@jcowan.reslife.okstate.edu js pendry js.pendry@msdw.com Juergen A. Erhard jae@laden.ilk.de Juergen Keil jk@tools.de +Juergen Leising juergen.leising@gmx.de Julien Sopena julien.sopena@lip6.fr Karl Berry kb@cs.umb.edu Karl Heuer kwzh@gnu.org diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm index e6c98c0..1befbd0 100644 --- a/lib/Automake/Variable.pm +++ b/lib/Automake/Variable.pm @@ -1180,7 +1180,7 @@ sub requires_variables ($$@) Get the C value of a variable, warn if the variable is conditionally defined. C<$var> can be either a variable name -or a C instance (this allows to calls sucha +or a C instance (this allows calls such as C<$var-Evariable_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> -- 2.7.4