summaryrefslogtreecommitdiffstats
path: root/Configure
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-06-16 11:38:30 +0200
committerRichard Levitte <levitte@openssl.org>2019-06-17 16:08:52 +0200
commit0ee7b9fe7f9afadcf566d740e01043faeaa9476e (patch)
treecef68ecea047d6f1d7ca6484d215c1c5a0cf0de5 /Configure
parent26de4ec68f9c332c8d24376b986cd54954d7c6d2 (diff)
Configure: allow conditions and variable values to have variable references
This will allow building variables on other variables, and to have conditions based on variable contents. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9166)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure8
1 files changed, 5 insertions, 3 deletions
diff --git a/Configure b/Configure
index c3f4f99ba6..c238907bee 100755
--- a/Configure
+++ b/Configure
@@ -1881,7 +1881,7 @@ if ($builder eq "unified") {
qr/^\s*IF\[((?:\\.|[^\\\]])*)\]\s*$/
=> sub {
if (! @skip || $skip[$#skip] > 0) {
- push @skip, !! $1;
+ push @skip, !! $expand_variables->($1);
} else {
push @skip, -1;
}
@@ -1890,7 +1890,7 @@ if ($builder eq "unified") {
=> sub { die "ELSIF out of scope" if ! @skip;
die "ELSIF following ELSE" if abs($skip[$#skip]) == 2;
$skip[$#skip] = -1 if $skip[$#skip] != 0;
- $skip[$#skip] = !! $1
+ $skip[$#skip] = !! $expand_variables->($1)
if $skip[$#skip] == 0; },
qr/^\s*ELSE\s*$/
=> sub { die "ELSE out of scope" if ! @skip;
@@ -1902,7 +1902,9 @@ if ($builder eq "unified") {
qr/^\s*${variable_re}\s*=\s*(.*?)\s*$/
=> sub {
if (!@skip || $skip[$#skip] > 0) {
- $variables{$1} = $2;
+ my $n = $1;
+ my $v = $2;
+ $variables{$n} = $expand_variables->($v);
}
},
qr/^\s*SUBDIRS\s*=\s*(.*)\s*$/