aboutsummaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-10-21 11:11:04 +0200
committerRichard Levitte <levitte@openssl.org>2018-10-31 15:46:36 +0100
commitb6e660754c2e799cffe4906269fcace0e07c73bc (patch)
treecb742907d3aa26564fc70f5df551bbbc74f04624 /Configure
parentddf2e8c8ccad49cff0d6a0a0b26ca892ec4ce33a (diff)
downloadopenssl-b6e660754c2e799cffe4906269fcace0e07c73bc.zip
openssl-b6e660754c2e799cffe4906269fcace0e07c73bc.tar.gz
openssl-b6e660754c2e799cffe4906269fcace0e07c73bc.tar.bz2
Configuration: when building the dirinfo structure, include shared_sources
This makes sure that any resulting directory target in the build files also depend on object files meant for shared libraries. As a side effect, we move the production of the dirinfo structure from common.tmpl to Configure, to make it easier to check the result. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7452)
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure36
1 files changed, 36 insertions, 0 deletions
diff --git a/Configure b/Configure
index 46218f7..bf0c2d5 100755
--- a/Configure
+++ b/Configure
@@ -2330,6 +2330,42 @@ EOF
delete $unified_info{includes}->{$dest};
}
}
+
+ # For convenience collect information regarding directories where
+ # files are generated, those generated files and the end product
+ # they end up in where applicable. Then, add build rules for those
+ # directories
+ my %loopinfo = ( "lib" => [ @{$unified_info{libraries}} ],
+ "dso" => [ @{$unified_info{engines}} ],
+ "bin" => [ @{$unified_info{programs}} ],
+ "script" => [ @{$unified_info{scripts}} ] );
+ foreach my $type (keys %loopinfo) {
+ foreach my $product (@{$loopinfo{$type}}) {
+ my %dirs = ();
+ my $pd = dirname($product);
+
+ foreach (@{$unified_info{sources}->{$product}},
+ @{$unified_info{shared_sources}->{$product} // []}) {
+ my $d = dirname($_);
+
+ # We don't want to create targets for source directories
+ # when building out of source
+ next if ($config{sourcedir} ne $config{builddir}
+ && $d =~ m|^\Q$config{sourcedir}\E|);
+ # We already have a "test" target, and the current directory
+ # is just silly to make a target for
+ next if $d eq "test" || $d eq ".";
+
+ $dirs{$d} = 1;
+ push @{$unified_info{dirinfo}->{$d}->{deps}}, $_
+ if $d ne $pd;
+ }
+ foreach (keys %dirs) {
+ push @{$unified_info{dirinfo}->{$_}->{products}->{$type}},
+ $product;
+ }
+ }
+ }
}
# For the schemes that need it, we provide the old *_obj configs