diff options
author | Richard Levitte <levitte@openssl.org> | 2016-06-05 22:12:04 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-06-06 15:14:36 +0200 |
commit | ec772a817afc0f788c38006f623204a7d76221ec (patch) | |
tree | 51a43e37c87fa8ce79d8ca9b37b4175260e9f8fd /Configurations | |
parent | 5584f65a1027b06fe0cfc4be28d1a232cf180e42 (diff) |
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: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'Configurations')
-rw-r--r-- | Configurations/common.tmpl | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Configurations/common.tmpl b/Configurations/common.tmpl index ae6e4a1229..48b3d18716 100644 --- a/Configurations/common.tmpl +++ b/Configurations/common.tmpl @@ -185,10 +185,22 @@ foreach my $product (@{$loopinfo{$type}}) { my %dirs = (); 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}}) { 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; push @{$unified_info{dirinfo}->{$d}->{deps}}, $_ if $d ne $pd; |