提交 ec772a81 编写于 作者: R Richard Levitte

Fix the directory target generation

The directories for the final products were never registered, it was
plain luck that intermediary files were in the same place and
registered the directory anyway.

Also, scripts are generated directly from source (binaries go through
intermadiary object files), so we need to explicitely make sure to
avoid registering the source directory unless it's an in source
build.
Reviewed-by: NAndy Polyakov <appro@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 5584f65a
...@@ -185,10 +185,22 @@ ...@@ -185,10 +185,22 @@
foreach my $product (@{$loopinfo{$type}}) { foreach my $product (@{$loopinfo{$type}}) {
my %dirs = (); my %dirs = ();
my $pd = dirname($product); my $pd = dirname($product);
# We already have a "test" target, and the current directory
# is just silly to make a target for
$dirs{$pd} = 1 unless $pd eq "test" || $pd eq ".";
foreach (@{$unified_info{sources}->{$product}}) { foreach (@{$unified_info{sources}->{$product}}) {
my $d = dirname($_); my $d = dirname($_);
next if $d eq "test"; # we already have a test target
next if $d eq "."; # current directory is just silly # 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; $dirs{$d} = 1;
push @{$unified_info{dirinfo}->{$d}->{deps}}, $_ push @{$unified_info{dirinfo}->{$d}->{deps}}, $_
if $d ne $pd; if $d ne $pd;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册