diff options
author | Richard Levitte <levitte@openssl.org> | 2016-04-02 22:26:38 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-06-04 20:33:46 +0200 |
commit | 0ad1d94df4f844eec8eb7ff404582253b4a3cfae (patch) | |
tree | 64ac8f27ae7520106c273ba17e30b32d28efea79 /Configurations/windows-makefile.tmpl | |
parent | 578b55144121b83a96e780f241f614759c75d1b5 (diff) |
Add developer targets for each subdirectory we have something to build in
Previous build scheme allowed building just the stuff in one
subdirectory, like this:
make -C crypto/aes
Because the unified only has a top-level Makefile, this is not
possible with it. This change adds a replacement where each directory
we have something to build in becomes a target in its own right,
allowing building something like this:
make crypto/aes
The exception is the directory test, because we already have such a
target.
Reviewed-by: Stephen Henson <steve@openssl.org>
Diffstat (limited to 'Configurations/windows-makefile.tmpl')
-rw-r--r-- | Configurations/windows-makefile.tmpl | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index 3dae414344..081e20b3f3 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -490,5 +490,41 @@ $script: $sources "-o$target{build_file}" $sources > "$script" EOF } + sub generatedir { + my %args = @_; + my $dir = $args{dir}; + my @deps = map { s|\.o$|$objext|; $_ } @{$args{deps}}; + my @actions = (); + my %extinfo = ( dso => $dsoext, + lib => $libext, + bin => $exeext ); + + foreach my $type (("dso", "lib", "bin", "script")) { + next unless defined($unified_info{dirinfo}->{$dir}->{products}->{$type}); + if ($type eq "lib") { + foreach my $lib (@{$unified_info{dirinfo}->{$dir}->{products}->{$type}}) { + push @actions, <<"EOF"; + \$(AR) \$(ARFLAGS) \$(AROUTFLAG)$lib$libext @<< +\$\? +<< +EOF + } + } else { + foreach my $prod (@{$unified_info{dirinfo}->{$dir}->{products}->{$type}}) { + if (dirname($prod) eq $dir) { + push @deps, $prod.$extinfo{$type}; + } else { + push @actions, "\t@ : No support to produce $type ".join(", ", @{$unified_info{dirinfo}->{$dir}->{products}->{$type}}); + } + } + } + } + + my $deps = join(" ", @deps); + my $actions = join("\n", "", @actions); + return <<"EOF"; +$args{dir} $args{dir}\\ : $deps$actions +EOF + } "" # Important! This becomes part of the template result. -} |