openssl/util/domd
Rich Salz 96d608beb0 Remove clean-depend
Remove depend hacks from demos/engines.
Remove clean-depend; just call makedepend (or $CC -M) and use that.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-29 11:15:20 -05:00

35 lines
798 B
Bash
Executable File

#!/bin/sh
# Wrapper to portably run makedepend or equivalent compiler built-in.
# Runs on Makefile.in, generates Makefile
TOP=$1
shift
if [ "$1" = "-MD" ]; then
shift
MAKEDEPEND=$1
shift
if [ "$MAKEDEPEND" = "ccache" ]; then
MAKEDEPEND="$MAKEDEPEND $1"
shift
fi
fi
if [ -z "$MAKEDEPEND" ] ; then
MAKEDEPEND=makedepend
fi
if ${MAKEDEPEND} --version 2>&1 | egrep "clang|gcc" >/dev/null
args=""
while [ $# -gt 0 ]; do
if [ "$1" != '--' ] ; then
args="$args $1"
fi
shift
done
${MAKEDEPEND} -Werror -DOPENSSL_DOING_MAKEDEPEND -M $args >Makefile.tmp || exit 1
cat Makefile.in Makefile.tmp >Makefile
rm Makefile.tmp
else
cp Makefile.in Makefile
${MAKEDEPEND} -DOPENSSL_DOING_MAKEDEPEND $@ || exit 1
fi