diff options
author | Richard Levitte <levitte@openssl.org> | 2019-08-19 08:54:00 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-09-26 22:41:47 +0200 |
commit | 03f30c552a07eb7686a9fc099b06653548afa941 (patch) | |
tree | 7181315ed5b09dfed4d3590841b5aeaac7c8056e /Configure | |
parent | Ensure man1 POD files start with openssl- (diff) | |
download | openssl-03f30c552a07eb7686a9fc099b06653548afa941.tar.xz openssl-03f30c552a07eb7686a9fc099b06653548afa941.zip |
Configure, build.info: make it possible to use variables in indexes
That will make it possible to assign different goals for translation
units depending on need.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9637)
Diffstat (limited to '')
-rwxr-xr-x | Configure | 29 |
1 files changed, 21 insertions, 8 deletions
@@ -1742,11 +1742,19 @@ if ($builder eq "unified") { my $value = ''; my $value_rest = shift; + if ($ENV{CONFIGURE_DEBUG_VARIABLE_EXPAND}) { + print STDERR + "DEBUG[\$expand_variables] Parsed '$value_rest' into:\n" + } while ($value_rest =~ /(?<!\\)${variable_re}/) { $value .= $`; $value .= $variables{$1}; $value_rest = $'; } + if ($ENV{CONFIGURE_DEBUG_VARIABLE_EXPAND}) { + print STDERR + "DEBUG[\$expand_variables] ... '$value$value_rest'\n"; + } return $value . $value_rest; }; @@ -1899,26 +1907,31 @@ if ($builder eq "unified") { }, qr/^\s*ORDINALS\[((?:\\.|[^\\\]])+)\]\s*=\s*(.*)\s*$/, - => sub { push @{$ordinals{$1}}, tokenize($expand_variables->($2)) + => sub { push @{$ordinals{$expand_variables->($1)}}, + tokenize($expand_variables->($2)) if !@skip || $skip[$#skip] > 0 }, qr/^\s*SOURCE\[((?:\\.|[^\\\]])+)\]\s*=\s*(.*)\s*$/ - => sub { push @{$sources{$1}}, tokenize($expand_variables->($2)) + => sub { push @{$sources{$expand_variables->($1)}}, + tokenize($expand_variables->($2)) if !@skip || $skip[$#skip] > 0 }, qr/^\s*SHARED_SOURCE\[((?:\\.|[^\\\]])+)\]\s*=\s*(.*)\s*$/ - => sub { push @{$shared_sources{$1}}, + => sub { push @{$shared_sources{$expand_variables->($1)}}, tokenize($expand_variables->($2)) if !@skip || $skip[$#skip] > 0 }, qr/^\s*INCLUDE\[((?:\\.|[^\\\]])+)\]\s*=\s*(.*)\s*$/ - => sub { push @{$includes{$1}}, tokenize($expand_variables->($2)) + => sub { push @{$includes{$expand_variables->($1)}}, + tokenize($expand_variables->($2)) if !@skip || $skip[$#skip] > 0 }, - qr/^\s*DEFINE\[((?:\\.|[^\\\]])*)\]\s*=\s*(.*)\s*$/ - => sub { push @{$defines{$1}}, tokenize($expand_variables->($2)) + qr/^\s*DEFINE\[((?:\\.|[^\\\]])+)\]\s*=\s*(.*)\s*$/ + => sub { push @{$defines{$expand_variables->($1)}}, + tokenize($expand_variables->($2)) if !@skip || $skip[$#skip] > 0 }, qr/^\s*DEPEND\[((?:\\.|[^\\\]])*)\]\s*=\s*(.*)\s*$/ - => sub { push @{$depends{$1}}, tokenize($expand_variables->($2)) + => sub { push @{$depends{$expand_variables->($1)}}, + tokenize($expand_variables->($2)) if !@skip || $skip[$#skip] > 0 }, qr/^\s*GENERATE\[((?:\\.|[^\\\]])+)\]\s*=\s*(.*)\s*$/ - => sub { push @{$generate{$1}}, $2 + => sub { push @{$generate{$expand_variables->($1)}}, $2 if !@skip || $skip[$#skip] > 0 }, qr/^\s*(?:#.*)?$/ => sub { }, "OTHERWISE" => sub { die "Something wrong with this line:\n$_\nat $sourced/$f" }, |