diff options
author | Richard Levitte <levitte@openssl.org> | 2016-03-11 09:26:49 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-03-11 11:19:50 +0100 |
commit | 987dbc7fbf9ae95430649662141ebb26bcd5ecad (patch) | |
tree | 906715822d0cc87200cedfa29fd315a6e7a84282 /Configurations | |
parent | More tweaks to the installation instructions (diff) | |
download | openssl-987dbc7fbf9ae95430649662141ebb26bcd5ecad.tar.xz openssl-987dbc7fbf9ae95430649662141ebb26bcd5ecad.zip |
Harmonise the two methods to generate dependency files
One of them didn't clean away .d.tmp files properly.
The other would overwrite the .d files unconditionally, thereby
causing a possibly unnecessary dependency rebuild, which touches the
date of Makefile, which causes a possibly unnecessary rebuild of
buildinf.h and everything that depends on that.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'Configurations')
-rw-r--r-- | Configurations/unix-Makefile.tmpl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 20fc076d8f..3718467fac 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -886,8 +886,12 @@ $obj$depext: $deps rm -f \$\@.tmp; touch \$\@.tmp -\$(MAKEDEPEND) -f\$\@.tmp -o"|$obj$objext" -- \$(CFLAGS) $ecflags$incs -- $srcs \\ 2>/dev/null - sed -e 's/^.*|//' -e 's/ \\/\\(\\\\.\\|[^ ]\\)*//g' -e '/: *\$\$/d' -e '/^\\(#.*\\| *\\)\$\$/d' \$\@.tmp > \$\@ - rm \$\@.tmp + sed -i -e 's/^.*|//' -e 's/ \\/\\(\\\\.\\|[^ ]\\)*//g' -e '/: *\$\$/d' -e '/^\\(#.*\\| *\\)\$\$/d' \$\@.tmp + \@if ! cmp \$\@.tmp \$\@ > /dev/null 2> /dev/null; then \\ + mv \$\@.tmp \$\@; \\ + else \\ + rm -f \$\@.tmp; \\ + fi EOF $deps = $obj.$depext; } @@ -904,6 +908,8 @@ $obj$objext: $deps \@touch $obj$depext.tmp \@if ! cmp $obj$depext.tmp $obj$depext > /dev/null 2> /dev/null; then \\ mv $obj$depext.tmp $obj$depext; \\ + else \\ + rm -f $obj$depext.tmp; \\ fi EOF } |