summaryrefslogtreecommitdiffstats
path: root/Configure
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-04-11 13:13:22 +0200
committerRichard Levitte <levitte@openssl.org>2018-04-11 20:52:14 +0200
commit8258975c94398930e7b5406b8a3af53a662d1354 (patch)
tree9720de44c3c65ae8d2e80a93258b70a0202e2021 /Configure
parentc12a2d2728fd9eb555ab347049ebdddef9d81d7f (diff)
Configuration: Simplify generating list of generated files in build file templates
Computing the value of the GENERATED variable in the build file templates is somewhat overcomplicated, and because of possible duplication errors, changes are potentially error prone. Looking more closely at how this list is determined, it can be observed that the exact list of files to check is consistently available in all the values found in the %unified_info tables 'depends', 'sources' and 'shared_sources', and all that's needed is to filter those values so only those present as keys in the 'generate' table are left. This computation is also common for all build files, so due to its apparent complexity, we move it to common0.tmpl, with the result left in a global variable (@generated), to be consumed by all build file templates. common0.tmpl is included among the files to process when creating build files, but unlike common.tmpl, it comes first of all. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5930)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure4
1 files changed, 3 insertions, 1 deletions
diff --git a/Configure b/Configure
index d1ea0618a5..99ab26f4a7 100755
--- a/Configure
+++ b/Configure
@@ -1630,7 +1630,9 @@ if ($builder eq "unified") {
die "*** Couldn't find any of:\n", join("\n", @build_file_templates), "\n";
}
$config{build_file_templates}
- = [ $build_file_template,
+ = [ cleanfile($srcdir, catfile("Configurations", "common0.tmpl"),
+ $blddir),
+ $build_file_template,
cleanfile($srcdir, catfile("Configurations", "common.tmpl"),
$blddir) ];