1 diff -cr ..\perl5os2.patch\perl5.001m.andy/makedepend.SH ./makedepend.SH
2 *** ../perl5os2.patch/perl5.001m.andy/makedepend.SH Mon Oct 09 21:41:04 1995
3 --- ./makedepend.SH Thu Sep 28 00:00:28 1995
10 + # In case Configure is not patched:
11 + : ${firstmakefile=makefile}
13 # We need .. when we are in the x2p directory if we are using the
14 # cppstdin wrapper script.
15 # Put .. and . first so that we pick up the present cppstdin, not
18 $cat /dev/null >.deptmp
20 if test -f Makefile; then
21 ! cp Makefile makefile
25 defrule=`<$mf sed -n \
26 ! -e '/^\.c\.o:.*;/{' \
28 -e 's/^[^;]*;[ ]*//p' \
31 ! -e '/^\.c\.o: *$/{' \
36 $cat /dev/null >.deptmp
38 if test -f Makefile; then
39 ! cp Makefile $firstmakefile
43 defrule=`<$mf sed -n \
44 ! -e '/^\.c\$(O_REGEXP):.*;/{' \
46 -e 's/^[^;]*;[ ]*//p' \
49 ! -e '/^\.c\$(O_REGEXP): *$/{' \
55 */*) finc="-I`echo $file | sed 's#/[^/]*$##`" ;;
58 ! $echo "Finding dependencies for $filebase.o."
59 ( $echo "#line 1 \"$file\""; \
61 -e "/^${filebase}_init(/q" \
63 */*) finc="-I`echo $file | sed 's#/[^/]*$##`" ;;
66 ! $echo "Finding dependencies for $filebase$obj_ext."
67 ( $echo "#line 1 \"$file\""; \
69 -e "/^${filebase}_init(/q" \
72 -e 's#\.[0-9][0-9]*\.c#'"$file.c#" \
73 -e 's/^[ ]*#[ ]*line/#/' \
74 -e '/^# *[0-9][0-9]* *[".\/]/!d' \
75 ! -e 's/^.*"\(.*\)".*$/'$filebase'.o: \1/' \
76 ! -e 's/^# *[0-9][0-9]* \(.*\)$/'$filebase'.o: \1/' \
79 $uniq | $sort | $uniq >> .deptmp
81 -e 's#\.[0-9][0-9]*\.c#'"$file.c#" \
82 -e 's/^[ ]*#[ ]*line/#/' \
83 -e '/^# *[0-9][0-9]* *[".\/]/!d' \
84 ! -e 's/^.*"\(.*\)".*$/'$filebase'\$(O): \1/' \
85 ! -e 's/^# *[0-9][0-9]* \(.*\)$/'$filebase'\$(O): \1/' \
88 $uniq | $sort | $uniq >> .deptmp
91 $echo "Updating $mf..."
92 $echo "# If this runs make out of memory, delete /usr/include lines." \
94 ! $sed 's|^\(.*\.o:\) *\(.*/.*\.c\) *$|\1 \2; '"$defrule \2|" .deptmp \
97 $MAKE hlist || ($echo "Searching for .h files..."; \
99 $echo "Updating $mf..."
100 $echo "# If this runs make out of memory, delete /usr/include lines." \
102 ! $sed 's|^\(.*\$(O_REGEXP):\) *\(.*/.*\.c\) *$|\1 \2; '"$defrule \2|" .deptmp \
105 $MAKE hlist || ($echo "Searching for .h files..."; \
108 $echo "Updating $mf..."
111 ! -e 's|^\(.*\)/\(.*\)\.c|\2.o: \1/\2.c; '"$defrule \1/\2.c|p" \
114 ! -e 's|^\(.*\)\.c|\1.o: \1.c|p' >> $mf.new
115 <.hlist $sed -n 's|\(.*/\)\(.*\)|s= \2= \1\2=|p' >.hsed
116 <.deptmp $sed -n 's|c:#include "\(.*\)".*$|o: \1|p' | \
117 $sed 's|^[^;]*/||' | \
119 $echo "Updating $mf..."
122 ! -e 's|^\(.*\)/\(.*\)\.c|\2\$(O): \1/\2.c; '"$defrule \1/\2.c|p" \
125 ! -e 's|^\(.*\)\.c|\1\$(O): \1.c|p' >> $mf.new
126 <.hlist $sed -n 's|\(.*/\)\(.*\)|s= \2= \1\2=|p' >.hsed
127 <.deptmp $sed -n 's|c:#include "\(.*\)".*$|o: \1|p' | \
128 $sed 's|^[^;]*/||' | \