diff options
author | Richard Levitte <levitte@openssl.org> | 2016-02-28 00:20:50 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-02-28 01:16:44 +0100 |
commit | 340da949ccde13f6506177e327ccc21f49f56d3b (patch) | |
tree | ce06693229bacd727fc7c1ce7cf5a93614ef1eaf /Configurations/descrip.mms.tmpl | |
parent | e0b5108c605b541252e601608ff70e8fb57d256f (diff) |
Make generation of dependency files more efficient when possible
When building with GNU C, clang or VMS C, it's more efficient to
generate dependency file and object file in one call rather than two.
Have the dependency output in a temporary file and compare it with the
previous one if available to see if replacement is waranted, thereby
avoiding unnecessary reconstruction of Makefile / descrip.mms.
Github issue #750
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'Configurations/descrip.mms.tmpl')
-rw-r--r-- | Configurations/descrip.mms.tmpl | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index eb60b4ad81..b7e047ba7c 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -435,19 +435,15 @@ configdata.pm : {- sourcefile("Configurations", "descrip.mms.tmpl") -} $(SRCDIR) my $after = $unified_info{after}->{$obj.".OBJ"} || "\@ !"; return <<"EOF"; -$obj.MMS : $deps +$obj.OBJ : $deps ${before} SET DEFAULT $forward - \$(CC) \$(CFLAGS)${incs} /MMS=(FILE=${objd}${objn}.MMS,TARGET=$obj.OBJ) /NOOBJECT $srcs - SET DEFAULT $backward - ${after} - - PURGE $obj.MMS -$obj.OBJ : $obj.MMS - ${before} - SET DEFAULT $forward - \$(CC) \$(CFLAGS)${incs} /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs + \$(CC) \$(CFLAGS)${incs} /MMS=(FILE=${objd}${objn}.tmp-MMS,TARGET=$obj.OBJ) /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs SET DEFAULT $backward ${after} + \@ PIPE ( \$(PERL) -e "use File::Compare qw/compare_text/; my \$x = compare_text(""$obj.MMS"",""$obj.tmp-MMS""); exit(0x10000000 + (\$x == 0));" || - + RENAME $obj.tmp-MMS $obj.mms ) + \@ IF F\$SEARCH("$obj.tmp-MMS") .NES. "" THEN DELETE $obj.tmp-MMS;* - PURGE $obj.OBJ EOF } |