This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pod/perlipc.pod patch
[perl5.git] / makedepend.SH
index 81d49db..89f650d 100755 (executable)
@@ -56,16 +56,22 @@ $rm -f *.c.c c/*.c.c
 if test -f Makefile; then
     rm -f $firstmakefile
     cp Makefile $firstmakefile
+    # On QNX, 'cp' preserves timestamp, so $firstmakefile appears
+    # to be out of date.  I don't know if OS/2 has touch, so do this:
+    case "$osname" in
+    os2) ;;
+    *) $touch $firstmakefile ;;
+    esac
 fi
 mf=$firstmakefile
 if test -f $mf; then
     defrule=`<$mf sed -n               \
-       -e '/^\.c\(\$(OBJ_EXT)\|\.o\):.*;/{'    \
+       -e '/^\.c\$(OBJ_EXT):.*;/{'     \
        -e    's/\$\*\.c//'             \
        -e    's/^[^;]*;[        ]*//p' \
        -e    q                         \
        -e '}'                          \
-       -e '/^\.c\(\$(OBJ_EXT)\|\.o\): *$/{'    \
+       -e '/^\.c\$(OBJ_EXT): *$/{'     \
        -e    N                         \
        -e    's/\$\*\.c//'             \
        -e    's/^.*\n[  ]*//p'         \
@@ -127,6 +133,10 @@ mv .shlist .shlist.old
 $egrep -v '^makedepend\.SH' <.shlist.old >.shlist
 mv .shlist .shlist.old
 $egrep -v '^Makefile\.SH' <.shlist.old >.shlist
+mv .shlist .shlist.old
+$egrep -v '^perl_exp\.SH' <.shlist.old >.shlist
+mv .shlist .shlist.old
+$egrep -v '^config_h\.SH' <.shlist.old >.shlist
 rm .shlist.old
 
 if $test -s .deptmp; then
@@ -137,7 +147,7 @@ if $test -s .deptmp; then
     $echo "Updating $mf..."
     $echo "# If this runs make out of memory, delete /usr/include lines." \
        >> $mf.new
-    $sed 's|^\(.*\(\$(OBJ_EXT)\|\.o\):\) *\(.*/.*\.c\) *$|\1 \3; '"$defrule \2|" .deptmp \
+    $sed 's|^\(.*\$(OBJ_EXT):\) *\(.*/.*\.c\) *$|\1 \2; '"$defrule \2|" .deptmp \
        >>$mf.new
 else
     $MAKE hlist || ($echo "Searching for .h files..."; \