This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
'no *POSIX' Patch speeding up make on BS2000
[perl5.git] / makedepend.SH
index f03f68b..7f8a108 100755 (executable)
@@ -108,7 +108,11 @@ for file in `$cat .clist`; do
                        if [ "$archname" = cygwin ]; then
                                uwinfix="-e s,\\\\\\\\,/,g"
                        else
-                               uwinfix=
+                               if [ "$osname" = posix-bc ]; then
+                                       uwinfix="-e s/\\*POSIX(\\(.*\\))/\\1/"
+                               else
+                                       uwinfix=
+                               fi
                        fi
                fi
        fi
@@ -130,18 +134,37 @@ for file in `$cat .clist`; do
        -e 's|\\$||' \
        -e p \
        -e '}' ) >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' \
-       -e 's/^.*"\(.*\)".*$/'$filebase'\$(OBJ_EXT): \1/' \
-       -e 's/^# *[0-9][0-9]* \(.*\)$/'$filebase'\$(OBJ_EXT): \1/' \
-       -e 's|: \./|: |' \
-       -e 's|\.c\.c|.c|' $uwinfix | \
-    $uniq | $sort | $uniq >> .deptmp
+    if [ "$osname" = os390 ]; then
+        if [ "$file" = perly.c ]; then
+            $echo '#endif' >>UU/$file.c
+        fi
+        $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' \
+           -e 's/^.*"\(.*\)".*$/'$filebase'\$(OBJ_EXT): \1/' \
+           -e 's/^# *[0-9][0-9]* \(.*\)$/'$filebase'\$(OBJ_EXT): \1/' \
+           -e 's|: \./|: |' \
+           -e 's|\.c\.c|.c|' $uwinfix | \
+        $uniq | $sort | $uniq >> .deptmp
+    else
+        $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#" \
+           -e 's/^[     ]*#[    ]*line/#/' \
+           -e '/^# *[0-9][0-9]* *[".\/]/!d' \
+           -e 's/^.*"\(.*\)".*$/'$filebase'\$(OBJ_EXT): \1/' \
+           -e 's/^# *[0-9][0-9]* \(.*\)$/'$filebase'\$(OBJ_EXT): \1/' \
+           -e 's|: \./|: |' \
+           -e 's|\.c\.c|.c|' $uwinfix | \
+        $uniq | $sort | $uniq >> .deptmp
+    fi
 done
 
 $sed <$mf >$mf.new -e '1,/^# AUTOMATICALLY/!d'