Configure: variable expand GENERATE values too
authorRichard Levitte <levitte@openssl.org>
Tue, 1 Jun 2021 05:45:54 +0000 (07:45 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 2 Jun 2021 06:18:47 +0000 (08:18 +0200)
Internal documentation doesn't allow for any exception...  Therefore,
even GENERATE values should be variable expanded.

(there are historical reasons why GENERATE was excepted from variable
expansion, that aren't applicable any more)

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/15554)

Configure

index 3a9ef03a6e97ac94b5283fe62f451dcd4041cb82..f6951bbb1883fec09c4f1b78e5587265448ad583 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -2212,7 +2212,7 @@ if ($builder eq "unified") {
                          if !@skip || $skip[$#skip] > 0; },
             qr/^\s* GENERATE ${index_re} = ${value_re} $/x
             => sub { $push_to->(\%generate, $expand_variables->($+{INDEX}),
-                                undef, undef, $+{VALUE})
+                                undef, undef, $expand_variables->($+{VALUE}))
                          if !@skip || $skip[$#skip] > 0; },
             qr/^\s* (?:\#.*)? $/x => sub { },
             "OTHERWISE" => sub { die "Something wrong with this line:\n$_\nat $sourced/$f" },