* lib/Automake/Variable.pm (variable_value): Do not read the TRUE
authorAlexandre Duret-Lutz <adl@gnu.org>
Sun, 7 Aug 2005 09:56:09 +0000 (09:56 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sun, 7 Aug 2005 09:56:09 +0000 (09:56 +0000)
value of a conditionally defined variable.
Report from Juergen Leising.

ChangeLog
THANKS
lib/Automake/Variable.pm

index 0a418b1..ac358f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2005-08-07  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       * 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 (file)
--- 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
index e6c98c0..1befbd0 100644 (file)
@@ -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>