summaryrefslogtreecommitdiffstats
path: root/Configurations/windows-makefile.tmpl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-03-12 09:18:44 +0100
committerRichard Levitte <levitte@openssl.org>2018-03-15 15:21:52 +0100
commitbbb9413b7e530aa25779b33b5ca7a5fd610e66f1 (patch)
treed787543bf1e254822806d9a1fadf4091146fc97f /Configurations/windows-makefile.tmpl
parent7731e619fba2f9ea1e888bf906289be37c52e6ac (diff)
Streamline dependency generation
It seems that only gcc -MMD produces dependency files that are "sane" for our needs. For all other methods, some post processing is needed: - 'makedepend' (Unix) insists that object files are located in the same spot as the source file. - 'cl /Zs /showIncludes' (Visual C) has "Note: including file: " where we'd like to see the object. - 'CC/DECC' (VMS) insists that the object file is located in the current directory, i.e. it strips away all directory information. So far, we've managed this (except for the VMS case) with individual uncommented perl command lines directly in the build file template. We're now collecting these diverse hacks into one perl script that takes an argument to tell what kind of input to expect and that massages whatever it gets on STDIN and outputs the result on STDOUT. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5591)
Diffstat (limited to 'Configurations/windows-makefile.tmpl')
-rw-r--r--Configurations/windows-makefile.tmpl10
1 files changed, 3 insertions, 7 deletions
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index b2742e01aa..8e7d18c2dd 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -599,13 +599,9 @@ EOF
}
return <<"EOF" if (!$disabled{makedepend});
$obj$depext: $deps
- \$(CC) $cflags /Zs /showIncludes $srcs 2>&1 | \\
- "\$(PERL)" -n << > $obj$depext
-chomp;
-s/^Note: including file: *//;
-\$\$collect{\$\$_} = 1;
-END { print '$obj$objext: ',join(" ", sort keys \%collect),"\\n" }
-<<
+ \$(CC) $cflags /Zs /showIncludes $srcs 2>&1 \\
+ | "\$(PERL)" "\$(SRCDIR)\\util\\postprocess-makedepend.pl" \\
+ "VC" "$obj$objext" > $obj$depext
$obj$objext: $obj$depext
\$(CC) $cflags -c \$(COUTFLAG)\$\@ @<<
$srcs