[PATCH 5.004_60] Fix to MM_VMS.PM
[p5sagit/p5-mst-13.2.git] / makedepend.SH
index 89f650d..dceca0b 100755 (executable)
@@ -28,6 +28,12 @@ MAKE=$make
 !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
@@ -48,7 +54,7 @@ esac
 # 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
@@ -99,7 +105,7 @@ for file in `$cat .clist`; do
     */*) 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" \
@@ -112,6 +118,7 @@ for file in `$cat .clist`; do
     $cppstdin $finc -I/usr/local/include -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' \