tweak to show up db-linked-with-libpthread-but-not-perl problem
[p5sagit/p5-mst-13.2.git] / makedepend.SH
index 74c3ecb..994123e 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-case $CONFIG in
+case $CONFIGDOTSH in
 '')
        if test -f config.sh; then TOP=.;
        elif test -f ../config.sh; then TOP=..;
@@ -37,7 +37,7 @@ esac
 
 export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh \$0; kill \$\$)
 
-case $CONFIG in
+case $CONFIGDOTSH in
 '')
        if test -f config.sh; then TOP=.;
        elif test -f ../config.sh; then TOP=..;
@@ -67,6 +67,7 @@ if test -f Makefile; then
     # to be out of date.  I don't know if OS/2 has touch, so do this:
     case "$osname" in
     os2) ;;
+    netbsd) ;;
     *) $touch $firstmakefile ;;
     esac
 fi
@@ -101,7 +102,15 @@ for file in `$cat .clist`; do
        if [ "$osname" = uwin ]; then
                uwinfix="-e s,\\\\\\\\,/,g -e s,\\([a-zA-Z]\\):/,/\\1/,g"
        else
-               uwinfix=
+               if [ "$osname" = os2 ]; then
+                       uwinfix="-e s,\\\\\\\\,/,g"
+               else
+                       if [ "$archname" = cygwin ]; then
+                               uwinfix="-e s,\\\\\\\\,/,g"
+                       else
+                               uwinfix=
+                       fi
+               fi
        fi
     case "$file" in
     *.c) filebase=`basename $file .c` ;;
@@ -121,6 +130,9 @@ for file in `$cat .clist`; do
        -e 's|\\$||' \
        -e p \
        -e '}' ) >UU/$file.c
+    if [ "$osname" = os390 -a "$file" = perly.c ]; then
+        $echo '#endif' >>UU/$file.c
+    fi
     $cppstdin $finc -I. $cppflags $cppminus <UU/$file.c |
     $sed \
        -e '/^#.*<stdin>/d' \