!GROK!THIS!
$spitshell >>makedepend <<'!NO!SUBS!'
+# This script should be called with
+# sh ./makedepend MAKE=$(MAKE)
+case "$1" in
+ MAKE=*) eval $1 ;;
+esac
+
export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$)
case $CONFIG in
# cppstdin wrapper script.
# Put .. and . first so that we pick up the present cppstdin, not
# an older one lying about in /usr/local/bin.
-PATH=".:..:$PATH"
+PATH=".$path_sep..$path_sep$PATH"
export PATH
$cat /dev/null >.deptmp
*/*) finc="-I`echo $file | sed 's#/[^/]*$##`" ;;
*) finc= ;;
esac
- $echo "Finding dependencies for $filebase$obj_ext."
+ $echo "Finding dependencies for $filebase$_o."
( $echo "#line 1 \"$file\""; \
$sed -n <$file \
-e "/^${filebase}_init(/q" \
-e 's|\\$||' \
-e p \
-e '}' ) >UU/$file.c
- $cppstdin $finc -I/usr/local/include -I. $cppflags $cppminus <UU/$file.c |
+ $cppstdin $finc -I. $cppflags $cppminus <UU/$file.c |
$sed \
-e '/^#.*<stdin>/d' \
+ -e '/^#.*"-"/d' \
-e 's#\.[0-9][0-9]*\.c#'"$file.c#" \
-e 's/^[ ]*#[ ]*line/#/' \
-e '/^# *[0-9][0-9]* *[".\/]/!d' \
$egrep -v '^makedepend\.SH' <.shlist.old >.shlist
mv .shlist .shlist.old
$egrep -v '^Makefile\.SH' <.shlist.old >.shlist
+mv .shlist .shlist.old
+$egrep -v '^perl_exp\.SH' <.shlist.old >.shlist
+mv .shlist .shlist.old
+$egrep -v '^config_h\.SH' <.shlist.old >.shlist
rm .shlist.old
if $test -s .deptmp; then