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.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
${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new
RC=$?
rm -f Makefile.tmp
-else
- ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND $@ && \
- ${PERL} $TOP/util/clean-depend.pl < Makefile > Makefile.new
- RC=$?
fi
if cmp -s Makefile.save Makefile.new; then
mv Makefile.save Makefile