diff options
author | Richard Levitte <levitte@openssl.org> | 2018-03-15 18:06:18 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-03-16 09:33:53 +0100 |
commit | c39785d4e64587d3a07a8ce8f25046f407107e71 (patch) | |
tree | da3c07a3cf22c0d530feb5dbd4a1a0a1bd766397 /Configurations | |
parent | ca1ed2904e9235deb8bf2d32629c6a49b61bf7c0 (diff) |
Move all dependency post-processing to util/add-depends.pl
In the end, it's more efficient to only have one perl instance (that
loads configdata.pm) dealing with dependency files than running one
(that still loads configdata.pm) for each such file.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5631)
Diffstat (limited to 'Configurations')
-rw-r--r-- | Configurations/descrip.mms.tmpl | 14 | ||||
-rw-r--r-- | Configurations/unix-Makefile.tmpl | 11 | ||||
-rw-r--r-- | Configurations/windows-makefile.tmpl | 6 |
3 files changed, 11 insertions, 20 deletions
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index cf448aa74a..f6061f16f7 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -505,7 +505,7 @@ distclean : clean depend : descrip.mms descrip.mms : FORCE @ ! {- output_off() if $disabled{makedepend}; "" -} - @ $(PERL) {- sourcefile("util", "add-depends.pl") -} + @ $(PERL) {- sourcefile("util", "add-depends.pl") -} "VMS C" @ ! {- output_on() if $disabled{makedepend}; "" -} # Install helper targets ############################################# @@ -878,12 +878,9 @@ EOF my $incs_on = join("\n\t\@ ", @{$incs_cmds[0]}) || '!'; my $incs_off = join("\n\t\@ ", @{$incs_cmds[1]}) || '!'; my $depbuild = $disabled{makedepend} ? "" - : " /MMS=(FILE=${objd}${objn}.tmp-D,TARGET=$obj.OBJ)"; - my $postprocess_makedepend = - sourcefile("util", "postprocess-makedepend.pl"); - my $objdir = dirname($obj); + : " /MMS=(FILE=${objd}${objn}.D,TARGET=$obj.OBJ)"; - return <<"EOF" + return <<"EOF"; $obj.OBJ : $deps ${before} SET DEFAULT $forward @@ -894,11 +891,6 @@ $obj.OBJ : $deps ${after} - PURGE $obj.OBJ EOF - . ($disabled{makedepend} ? "" : <<"EOF" - \$(PERL) $postprocess_makedepend "VMS C" $objdir < $obj.tmp-D > $obj.d - - DELETE $obj.tmp-D;* -EOF - ); } sub libobj2shlib { my %args = @_; diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index e9d112ba69..cb134e7931 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -12,6 +12,7 @@ our $shlibextsimple = $target{shared_extension_simple} || ".so"; our $shlibextimport = $target{shared_import_extension} || ""; our $dsoext = $target{dso_extension} || ".so"; + our $makedepprog = $disabled{makedepend} ? undef : $config{makedepprog}; sub windowsdll { $config{target} =~ /^(?:Cygwin|mingw)/ } @@ -419,7 +420,9 @@ distclean: clean # concatenate only if that is true. depend: @: {- output_off() if $disabled{makedepend}; "" -} - @$(PERL) $(SRCDIR)/util/add-depends.pl + @$(PERL) $(SRCDIR)/util/add-depends.pl {- + defined $makedepprog && $makedepprog =~ /\/makedepend/ + ? 'makedepend' : 'gcc' -} @: {- output_on() if $disabled{makedepend}; "" -} # Install helper targets ############################################# @@ -970,7 +973,6 @@ EOF my $cmd; my $cmdflags; my $cmdcompile; - my $makedepprog = $disabled{makedepend} ? undef : $config{makedepprog}; if (grep /\.rc$/, @srcs) { $cmd = '$(RC)'; $cmdflags = '$(RCFLAGS)'; @@ -1032,9 +1034,8 @@ $obj$objext: $deps EOF if (defined $makedepprog && $makedepprog =~ /\/makedepend/) { $recipe .= <<"EOF"; - \$(MAKEDEPEND) -f- -o"|\$\@" -- $incs $cmdflags -- $srcs 2>/dev/null \\ - | \$(PERL) \$(SRCDIR)/util/postprocess-makedepend.pl \\ - 'makedepend' > $obj$depext + \$(MAKEDEPEND) -f- -Y -- $incs $cmdflags -- $srcs 2>/dev/null \\ + > $obj$depext EOF } } diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index dde22fb217..ca2e75e1f1 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -382,7 +382,7 @@ distclean: clean depend: @ rem {- output_off() if $disabled{makedepend}; "" -} - @ "$(PERL)" "$(SRCDIR)\util\add-depends.pl" + @ "$(PERL)" "$(SRCDIR)\util\add-depends.pl" "VC" @ rem {- output_on() if $disabled{makedepend}; "" -} # Install helper targets ############################################# @@ -599,9 +599,7 @@ EOF } return <<"EOF" if (!$disabled{makedepend}); $obj$depext: $deps - \$(CC) $cflags /Zs /showIncludes $srcs 2>&1 \\ - | "\$(PERL)" "\$(SRCDIR)\\util\\postprocess-makedepend.pl" \\ - "VC" "$obj$objext" > $obj$depext + \$(CC) $cflags /Zs /showIncludes $srcs 2>&1 > $obj$depext $obj$objext: $obj$depext \$(CC) $cflags -c \$(COUTFLAG)\$\@ $srcs EOF |