This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
integrate cfgperl contents into mainline
[perl5.git] / makedepend.SH
index 74c3ecb..7129e08 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,8 +130,12 @@ 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 '1d' \
        -e '/^#.*<stdin>/d' \
        -e '/^#.*"-"/d' \
        -e 's#\.[0-9][0-9]*\.c#'"$file.c#" \