diff options
author | Richard Levitte <levitte@openssl.org> | 2018-03-12 09:18:44 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-03-15 15:21:52 +0100 |
commit | bbb9413b7e530aa25779b33b5ca7a5fd610e66f1 (patch) | |
tree | d787543bf1e254822806d9a1fadf4091146fc97f /Configurations/descrip.mms.tmpl | |
parent | 7731e619fba2f9ea1e888bf906289be37c52e6ac (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/descrip.mms.tmpl')
-rw-r--r-- | Configurations/descrip.mms.tmpl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index 7e7bf71efc..cf448aa74a 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -3,6 +3,7 @@ ## {- join("\n## ", @autowarntext) -} {- use File::Spec::Functions qw/:DEFAULT abs2rel rel2abs/; + use File::Basename; # Our prefix, claimed when speaking with the VSI folks Tuesday # January 26th 2016 @@ -878,6 +879,9 @@ EOF 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); return <<"EOF" $obj.OBJ : $deps @@ -891,9 +895,8 @@ $obj.OBJ : $deps - PURGE $obj.OBJ EOF . ($disabled{makedepend} ? "" : <<"EOF" - \@ PIPE ( \$(PERL) -e "use File::Compare qw/compare_text/; my \$x = compare_text(""$obj.D"",""$obj.tmp-D""); exit(0x10000000 + (\$x == 0));" || - - RENAME $obj.tmp-D $obj.d ) - \@ IF F\$SEARCH("$obj.tmp-D") .NES. "" THEN DELETE $obj.tmp-D;* + \$(PERL) $postprocess_makedepend "VMS C" $objdir < $obj.tmp-D > $obj.d + - DELETE $obj.tmp-D;* EOF ); } |