Skip to content

Commit 635bd40

Browse files
committed
In build.info, an IF within a clause that's skipped over shouldn't apply
If we find an IF within a clause that's skipped over, set it to be skipped as well. Reviewed-by: Matt Caswell <matt@openssl.org>
1 parent 4a4e250 commit 635bd40

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Configure

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,13 @@ if ($builder eq "unified") {
13331333
$l1 =~ s/\\$//; $l1.$l2 }),
13341334
# Info we're looking for
13351335
qr/^\s*IF\[((?:\\.|[^\\\]])*)\]\s*$/
1336-
=> sub { push @skip, !! $1; },
1336+
=> sub {
1337+
if (! @skip || $skip[$#skip] >= 0) {
1338+
push @skip, !! $1;
1339+
} else {
1340+
push @skip, -1;
1341+
}
1342+
},
13371343
qr/^\s*ELSIF\[((?:\\.|[^\\\]])*)\]\s*$/
13381344
=> sub { die "ELSIF out of scope" if ! @skip;
13391345
die "ELSIF following ELSE" if abs($skip[$#skip]) == 2;

0 commit comments

Comments
 (0)