X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=util%2Fdomd;h=6eb019ea1672d7e482ec0496017c19b9084cc2bd;hb=7cca1f96bf82b22ab49f179bae7df1562d0a104b;hp=95bb1b06e2578696d3618e48cdb58d28dd1087ed;hpb=7934ce27cd112d7790f1886aa044a5e66f5681f9;p=oweals%2Fopenssl.git diff --git a/util/domd b/util/domd index 95bb1b06e2..6eb019ea16 100755 --- a/util/domd +++ b/util/domd @@ -6,16 +6,25 @@ TOP=$1 shift if [ "$1" = "-MD" ]; then shift - MAKEDEPEND=$1 + MAKEDEPEND="" + while [ "$1" != "--" ]; do + MAKEDEPEND="$MAKEDEPEND $1" + shift + done shift 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 || - echo $MAKEDEPEND | grep "gcc" > /dev/null; then +if expr "$MAKEDEPEND" : ".*makedepend" > /dev/null; then + ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND $@ && \ + ${PERL} $TOP/util/clean-depend.pl < Makefile > Makefile.new + RC=$? +else args="" while [ $# -gt 0 ]; do if [ "$1" != "--" ]; then args="$args $1"; fi @@ -27,12 +36,13 @@ if ${MAKEDEPEND} --version 2>&1 | grep "clang" > /dev/null || ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new RC=$? rm -f Makefile.tmp +fi +if cmp -s Makefile.save Makefile.new; then + mv Makefile.save Makefile + rm -f Makefile.new else - ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND $@ && \ - ${PERL} $TOP/util/clean-depend.pl < Makefile > Makefile.new - RC=$? + mv Makefile.new Makefile fi -mv Makefile.new Makefile # unfake the presence of Kerberos rm $TOP/krb5.h