This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sv_2pv_nolen, sv_2pvbyte_nolen and sv_2pvutf8_nolen can all be replaced
[perl5.git] / makedepend.SH
index 5894995..688f656 100755 (executable)
@@ -58,6 +58,11 @@ case $PERL_CONFIG_SH in
        ;;
 esac
 
+# Avoid localized gcc messages
+case "$ccname" in
+    gcc) LC_ALL=C ; export LC_ALL ;;
+esac
+
 # We need .. when we are in the x2p directory if we are using the
 # cppstdin wrapper script.
 # Put .. and . first so that we pick up the present cppstdin, not
@@ -136,6 +141,11 @@ 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
+
     if [ "$osname" = os390 ]; then
         $cppstdin $finc -I. $cppflags $cppminus <UU/$file.c |
         $sed \
@@ -150,7 +160,7 @@ for file in `$cat .clist`; do
            -e 's|\.c\.c|.c|' $uwinfix | \
         $uniq | $sort | $uniq >> .deptmp
     else
-        $cppstdin $finc -I. $cppflags $cppminus <UU/$file.c 2>&1 |
+        $cppstdin $finc -I. $cppflags $cppminus <UU/$file.c >.cout 2>.cerr
         $sed \
            -e '1d' \
            -e '/^#.*<stdin>/d' \
@@ -165,7 +175,7 @@ for file in `$cat .clist`; do
            -e 's/^.*"\(.*\)".*$/'$filebase'\$(OBJ_EXT): \1/' \
            -e 's/^# *[0-9][0-9]* \(.*\)$/'$filebase'\$(OBJ_EXT): \1/' \
            -e 's|: \./|: |' \
-           -e 's|\.c\.c|.c|' $uwinfix | \
+           -e 's|\.c\.c|.c|' $uwinfix .cout .cerr| \
         $uniq | $sort | $uniq >> .deptmp
     fi
 done
@@ -230,7 +240,7 @@ $rm -f $mf
 $cp $mf.new $mf
 $rm $mf.new
 $echo "# WARNING: Put nothing here or make depend will gobble it up!" >> $mf
-$rm -rf .deptmp UU .shlist .clist .hlist .hsed
+$rm -rf .deptmp UU .shlist .clist .hlist .hsed .cout .cerr
 rmdir .depending
 
 !NO!SUBS!