Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1067
diff -u -r1.1067 automake.in
--- automake.in 2001/05/05 21:16:36     1.1067
+++ automake.in 2001/05/06 00:40:00
@@ -5487,13 +5487,16 @@
 {
     my ($cond, $when) = @_;
 
+    # Make a hash holding all the values from $WHEN.
+    my (%cond_vals);
+    grep ($cond_vals{$_} = 1, split (' ', $when));
+
     # Check each component of $cond, which looks `COND1 COND2'.
     foreach my $comp (split (' ', $cond))
     {
-       if (index ($when, $comp) == -1)
-       {
-           return 0;
-       }
+       # TRUE is always true.
+       return 1 if $comp eq 'TRUE';
+       return 0 if ! defined $cond_vals{$comp};
     }


I don't understand why you had TRUE here.  I mean, it seems to me it's
a `next' not a return.  Conditionals are conjunctions, not
disjunctions.

For instance your code, I believe, will

TRUE FOO when BAR    => 1

and

FOO TRUE when BAR    => 0

while both should 0.

Reply via email to