Commit | Line | Data |
4633a7c4 |
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 |
4 | *************** |
5 | *** 43,48 **** |
6 | --- 43,51 ---- |
7 | ;; |
8 | esac |
9 | |
10 | + # In case Configure is not patched: |
11 | + : ${firstmakefile=makefile} |
12 | + |
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 |
16 | *************** |
17 | *** 53,69 **** |
18 | $cat /dev/null >.deptmp |
19 | $rm -f *.c.c c/*.c.c |
20 | if test -f Makefile; then |
21 | ! cp Makefile makefile |
22 | fi |
23 | ! mf=makefile |
24 | if test -f $mf; then |
25 | defrule=`<$mf sed -n \ |
26 | ! -e '/^\.c\.o:.*;/{' \ |
27 | -e 's/\$\*\.c//' \ |
28 | -e 's/^[^;]*;[ ]*//p' \ |
29 | -e q \ |
30 | -e '}' \ |
31 | ! -e '/^\.c\.o: *$/{' \ |
32 | -e N \ |
33 | -e 's/\$\*\.c//' \ |
34 | -e 's/^.*\n[ ]*//p' \ |
35 | --- 56,72 ---- |
36 | $cat /dev/null >.deptmp |
37 | $rm -f *.c.c c/*.c.c |
38 | if test -f Makefile; then |
39 | ! cp Makefile $firstmakefile |
40 | fi |
41 | ! mf=$firstmakefile |
42 | if test -f $mf; then |
43 | defrule=`<$mf sed -n \ |
44 | ! -e '/^\.c\$(O_REGEXP):.*;/{' \ |
45 | -e 's/\$\*\.c//' \ |
46 | -e 's/^[^;]*;[ ]*//p' \ |
47 | -e q \ |
48 | -e '}' \ |
49 | ! -e '/^\.c\$(O_REGEXP): *$/{' \ |
50 | -e N \ |
51 | -e 's/\$\*\.c//' \ |
52 | -e 's/^.*\n[ ]*//p' \ |
53 | *************** |
54 | *** 91,97 **** |
55 | */*) finc="-I`echo $file | sed 's#/[^/]*$##`" ;; |
56 | *) finc= ;; |
57 | esac |
58 | ! $echo "Finding dependencies for $filebase.o." |
59 | ( $echo "#line 1 \"$file\""; \ |
60 | $sed -n <$file \ |
61 | -e "/^${filebase}_init(/q" \ |
62 | --- 94,100 ---- |
63 | */*) finc="-I`echo $file | sed 's#/[^/]*$##`" ;; |
64 | *) finc= ;; |
65 | esac |
66 | ! $echo "Finding dependencies for $filebase$obj_ext." |
67 | ( $echo "#line 1 \"$file\""; \ |
68 | $sed -n <$file \ |
69 | -e "/^${filebase}_init(/q" \ |
70 | *************** |
71 | *** 107,114 **** |
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/' \ |
77 | -e 's|: \./|: |' \ |
78 | -e 's|\.c\.c|.c|' | \ |
79 | $uniq | $sort | $uniq >> .deptmp |
80 | --- 110,117 ---- |
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/' \ |
86 | -e 's|: \./|: |' \ |
87 | -e 's|\.c\.c|.c|' | \ |
88 | $uniq | $sort | $uniq >> .deptmp |
89 | *************** |
90 | *** 126,132 **** |
91 | $echo "Updating $mf..." |
92 | $echo "# If this runs make out of memory, delete /usr/include lines." \ |
93 | >> $mf.new |
94 | ! $sed 's|^\(.*\.o:\) *\(.*/.*\.c\) *$|\1 \2; '"$defrule \2|" .deptmp \ |
95 | >>$mf.new |
96 | else |
97 | $MAKE hlist || ($echo "Searching for .h files..."; \ |
98 | --- 129,135 ---- |
99 | $echo "Updating $mf..." |
100 | $echo "# If this runs make out of memory, delete /usr/include lines." \ |
101 | >> $mf.new |
102 | ! $sed 's|^\(.*\$(O_REGEXP):\) *\(.*/.*\.c\) *$|\1 \2; '"$defrule \2|" .deptmp \ |
103 | >>$mf.new |
104 | else |
105 | $MAKE hlist || ($echo "Searching for .h files..."; \ |
106 | *************** |
107 | *** 136,145 **** |
108 | $echo "Updating $mf..." |
109 | <.clist $sed -n \ |
110 | -e '/\//{' \ |
111 | ! -e 's|^\(.*\)/\(.*\)\.c|\2.o: \1/\2.c; '"$defrule \1/\2.c|p" \ |
112 | -e d \ |
113 | -e '}' \ |
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|^[^;]*/||' | \ |
118 | --- 139,148 ---- |
119 | $echo "Updating $mf..." |
120 | <.clist $sed -n \ |
121 | -e '/\//{' \ |
122 | ! -e 's|^\(.*\)/\(.*\)\.c|\2\$(O): \1/\2.c; '"$defrule \1/\2.c|p" \ |
123 | -e d \ |
124 | -e '}' \ |
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|^[^;]*/||' | \ |