make depend: prefer clang over makedepend
[openssl.git] / util / domd
index 552a352e3a84bea33ffd88b05f1dceb032760b4f..f5be00deec4943636b6715f38d9dfbdb6bbb0c6b 100755 (executable)
--- a/util/domd
+++ b/util/domd
@@ -12,7 +12,8 @@ fi
 if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi
 
 cp Makefile Makefile.save
-if expr "$MAKEDEPEND" : '.*cc' > /dev/null; then
+if ${MAKEDEPEND} --version 2>&1 | grep -q "clang" ||
+   echo $MAKEDEPEND | grep -q "gcc"; then
     args=""
     while [ $# -gt 0 ]; do
        if [ "$1" != "--" ]; then args="$args $1"; fi