2 # Do a makedepend, only leave out the standard headers
3 # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
7 if [ "$1" = "-MD" ]; then
12 if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi
14 cp Makefile Makefile.save
15 # fake the presence of Kerberos
17 if expr "$MAKEDEPEND" : '.*gcc$' > /dev/null; then
19 while [ $# -gt 0 ]; do
20 if [ "$1" != "--" ]; then args="$args $1"; fi
23 sed -e '/^# DO NOT DELETE.*/,$d' < Makefile > Makefile.tmp
24 echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp
25 ${MAKEDEPEND} -Werror -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp || exit 1
26 ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new
30 ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND $@ && \
31 ${PERL} $TOP/util/clean-depend.pl < Makefile > Makefile.new
34 mv Makefile.new Makefile
35 # unfake the presence of Kerberos