This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Resync with mainline prior to post-5.6.0 updates
[perl5.git] / makedepend.SH
index 7129e08..9a6f4c1 100755 (executable)
@@ -130,22 +130,37 @@ for file in `$cat .clist`; do
        -e 's|\\$||' \
        -e p \
        -e '}' ) >UU/$file.c
        -e 's|\\$||' \
        -e p \
        -e '}' ) >UU/$file.c
-    if [ "$osname" = os390 -a "$file" = perly.c ]; then
-        $echo '#endif' >>UU/$file.c
+    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
     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#" \
-       -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
 done
 
 $sed <$mf >$mf.new -e '1,/^# AUTOMATICALLY/!d'
 done
 
 $sed <$mf >$mf.new -e '1,/^# AUTOMATICALLY/!d'