diff options
author | Orgad Shaneh <orgads@gmail.com> | 2016-09-19 15:12:08 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2016-11-16 09:08:27 +0200 |
commit | f4ef1c53486d378ab2e2ef3427c0eb1c2fea358f (patch) | |
tree | d97b72d590bdd31312074bb37bf8f2e76e98ae4d | |
parent | 7a9d7128d87d1572a0b7f99ff7b19d704395c8db (diff) | |
download | openssl-new-f4ef1c53486d378ab2e2ef3427c0eb1c2fea358f.tar.gz |
domd: Preserve Makefile time when it is unchanged
also on systems with makedepend that does not report its version, or that
its version does not contain "gcc" or "clang".
Some versions of makedepends just overwrite Makefile. Preserve the
timestamp of the previous Makefile, and copy it back if it is unchanged.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1370)
-rwxr-xr-x | util/domd | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -11,7 +11,9 @@ if [ "$1" = "-MD" ]; then fi if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi -cp Makefile Makefile.save +# Preserve Makefile timestamp by moving instead of copying (cp -p is GNU only) +mv Makefile Makefile.save +cp Makefile.save Makefile # fake the presence of Kerberos touch $TOP/krb5.h if ${MAKEDEPEND} --version 2>&1 | grep "clang" > /dev/null || @@ -32,9 +34,10 @@ else ${PERL} $TOP/util/clean-depend.pl < Makefile > Makefile.new RC=$? fi -if ! cmp -s Makefile Makefile.new; then +if ! cmp -s Makefile.save Makefile.new; then mv Makefile.new Makefile else + mv Makefile.save Makefile rm -f Makefile.new fi # unfake the presence of Kerberos |