mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Configure: DON'T trickle down includes from products to sources
Instead, use the include settings from the products later in the process, making it possible to have different includes for two different libraries that share the same source code. Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7159)
This commit is contained in:
parent
d6b345708f
commit
609e4be88e
@ -82,7 +82,8 @@
|
||||
generator_incs => $unified_info{includes}->{$script},
|
||||
generator_deps => $unified_info{depends}->{$script},
|
||||
deps => $unified_info{depends}->{$src},
|
||||
incs => $unified_info{includes}->{$obj},
|
||||
incs => [ @{$unified_info{includes}->{$obj}},
|
||||
@{$unified_info{includes}->{$bin}} ],
|
||||
%opts);
|
||||
foreach (@{$unified_info{depends}->{$src}}) {
|
||||
dogenerate($_, $obj, $bin, %opts);
|
||||
@ -103,7 +104,8 @@
|
||||
product => $bin,
|
||||
srcs => $unified_info{sources}->{$obj},
|
||||
deps => $unified_info{depends}->{$obj},
|
||||
incs => $unified_info{includes}->{$obj},
|
||||
incs => [ @{$unified_info{includes}->{$obj}},
|
||||
@{$unified_info{includes}->{$bin}} ],
|
||||
%opts);
|
||||
foreach ((@{$unified_info{sources}->{$obj}},
|
||||
@{$unified_info{depends}->{$obj}})) {
|
||||
|
24
Configure
24
Configure
@ -2189,26 +2189,6 @@ EOF
|
||||
}
|
||||
}
|
||||
|
||||
# Trickle down includes placed on libraries, engines and programs to
|
||||
# their sources (i.e. object files)
|
||||
foreach my $dest (keys %{$unified_info{engines}},
|
||||
keys %{$unified_info{libraries}},
|
||||
keys %{$unified_info{programs}}) {
|
||||
foreach my $k (("source", "build")) {
|
||||
next unless defined($unified_info{includes}->{$dest}->{$k});
|
||||
my @incs = reverse @{$unified_info{includes}->{$dest}->{$k}};
|
||||
foreach my $obj (grep /\.o$/,
|
||||
(keys %{$unified_info{sources}->{$dest}},
|
||||
keys %{$unified_info{shared_sources}->{$dest}})) {
|
||||
foreach my $inc (@incs) {
|
||||
unshift @{$unified_info{includes}->{$obj}->{$k}}, $inc
|
||||
unless grep { $_ eq $inc } @{$unified_info{includes}->{$obj}->{$k}};
|
||||
}
|
||||
}
|
||||
}
|
||||
delete $unified_info{includes}->{$dest};
|
||||
}
|
||||
|
||||
### Make unified_info a bit more efficient
|
||||
# One level structures
|
||||
foreach (("programs", "libraries", "engines", "scripts", "extra", "overrides")) {
|
||||
@ -2233,9 +2213,11 @@ EOF
|
||||
push @{$unified_info{includes}->{$dest}}, $inc
|
||||
unless grep { $_ eq $inc } @{$unified_info{includes}->{$dest}};
|
||||
}
|
||||
} else {
|
||||
} elsif (defined($unified_info{includes}->{$dest}->{source})) {
|
||||
$unified_info{includes}->{$dest} =
|
||||
[ @{$unified_info{includes}->{$dest}->{source}} ];
|
||||
} else {
|
||||
delete $unified_info{includes}->{$dest};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user