Index: ChangeLog =================================================================== RCS file: /cvs/automake/automake/ChangeLog,v retrieving revision 1.1513 diff -u -r1.1513 ChangeLog --- ChangeLog 2001/07/31 16:39:37 1.1513 +++ ChangeLog 2001/07/31 21:25:58 @@ -1,3 +1,10 @@ +2001-07-31 Richard Boulton + + * automake.in (variable_conditions_sub): Remove @parent_conds + argument. This was old logic - duplicate or impossible + conditionals are removed later by &variable_conditions_reduce(). + Fixes tests/cond13.test. + 2001-07-31 Tom Tromey * tests/Makefile.am (TESTS): Added cond13.test. Index: automake.in =================================================================== RCS file: /cvs/automake/automake/automake.in,v retrieving revision 1.1164 diff -u -r1.1164 automake.in --- automake.in 2001/07/31 04:22:07 1.1164 +++ automake.in 2001/07/31 21:26:15 @@ -5849,7 +5849,7 @@ %vars_scanned = (); - my @new_conds = &variable_conditions_sub ($var, '', ()); + my @new_conds = &variable_conditions_sub ($var, ''); # Now we want to return all permutations of the subvariable # conditions. my %allconds = (); @@ -5894,14 +5894,13 @@ -# &variable_conditions_sub ($VAR, $PARENT, @PARENT_CONDS) +# &variable_conditions_sub ($VAR, $PARENT) # ------------------------------------------------------- # A subroutine of variable_conditions. This returns all the -# conditions of $VAR which are satisfiable when all of @PARENT_CONDS -# are true. +# conditions of $VAR, including those of any sub-variables. sub variable_conditions_sub { - my ($var, $parent, @parent_conds) = @_; + my ($var, $parent) = @_; my @new_conds = (); if (defined $vars_scanned{$var}) @@ -5915,16 +5914,10 @@ # Examine every condition under which $VAR is defined. foreach my $vcond (keys %{$var_value{$var}}) { - # If this condition cannot be true when the parent conditions - # are true, then skip it. - next - if ! conditionals_true_when (@parent_conds, $vcond); - push (@this_conds, $vcond); # If $VAR references some other variable, then compute the # conditions for that subvariable. - push (@parent_conds, $vcond); my @subvar_conds = (); foreach (split (' ', $var_value{$var}{$vcond})) { @@ -5938,7 +5931,7 @@ # Here we compute all the conditions under which the # subvariable is defined. Then we go through and add # $VCOND to each. - my @svc = &variable_conditions_sub ($1, $var, @parent_conds); + my @svc = &variable_conditions_sub ($1, $var); foreach my $item (@svc) { my $val = conditional_string ($vcond, split (' ', $item)); @@ -5947,7 +5940,6 @@ } } } - pop (@parent_conds); # If there are no conditional subvariables, then we want to # return this condition. Otherwise, we want to return the @@ -5989,9 +5981,6 @@ } } next if ! $ok; - - next - if ! conditionals_true_when (@parent_conds, $perm); # This permutation was not already handled, and is valid # for the parents.