提交 635bd409 编写于 作者: R Richard Levitte

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: NMatt Caswell <matt@openssl.org>
上级 4a4e250c
...@@ -1333,7 +1333,13 @@ if ($builder eq "unified") { ...@@ -1333,7 +1333,13 @@ if ($builder eq "unified") {
$l1 =~ s/\\$//; $l1.$l2 }), $l1 =~ s/\\$//; $l1.$l2 }),
# Info we're looking for # Info we're looking for
qr/^\s*IF\[((?:\\.|[^\\\]])*)\]\s*$/ qr/^\s*IF\[((?:\\.|[^\\\]])*)\]\s*$/
=> sub { push @skip, !! $1; }, => sub {
if (! @skip || $skip[$#skip] >= 0) {
push @skip, !! $1;
} else {
push @skip, -1;
}
},
qr/^\s*ELSIF\[((?:\\.|[^\\\]])*)\]\s*$/ qr/^\s*ELSIF\[((?:\\.|[^\\\]])*)\]\s*$/
=> sub { die "ELSIF out of scope" if ! @skip; => sub { die "ELSIF out of scope" if ! @skip;
die "ELSIF following ELSE" if abs($skip[$#skip]) == 2; die "ELSIF following ELSE" if abs($skip[$#skip]) == 2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册