summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util/domd
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/util/domd')
-rw-r--r--src/lib/libcrypto/util/domd34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/lib/libcrypto/util/domd b/src/lib/libcrypto/util/domd
new file mode 100644
index 0000000000..5610521f0b
--- /dev/null
+++ b/src/lib/libcrypto/util/domd
@@ -0,0 +1,34 @@
1#!/bin/sh
2# Do a makedepend, only leave out the standard headers
3# Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
4
5TOP=$1
6shift
7if [ "$1" = "-MD" ]; then
8 shift
9 MAKEDEPEND=$1
10 shift
11fi
12if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi
13
14cp Makefile Makefile.save
15# fake the presence of Kerberos
16touch $TOP/krb5.h
17if [ "$MAKEDEPEND" = "gcc" ]; then
18 args=""
19 while [ $# -gt 0 ]; do
20 if [ "$1" != "--" ]; then args="$args $1"; fi
21 shift
22 done
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 gcc -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp
26 ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new
27 rm -f Makefile.tmp
28else
29 ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND -f Makefile $@
30 ${PERL} $TOP/util/clean-depend.pl < Makefile > Makefile.new
31fi
32mv Makefile.new Makefile
33# unfake the presence of Kerberos
34rm $TOP/krb5.h