Commit | Line | Data |
2304df62 |
1 | # $RCSfile: Makefile.SH,v 28453Revision: 4.1 28453Date: 92/08/07 18:29:07 $ |
79072805 |
2 | # |
3 | # $Log: Makefile.SH,v $ |
4 | # Revision 4.1 92/08/07 18:29:07 lwall |
5 | # |
6 | # Revision 4.0.1.3 92/06/08 16:11:32 lwall |
7 | # patch20: SH files didn't work well with symbolic links |
8 | # patch20: cray didn't give enough memory to /bin/sh |
9 | # patch20: makefiles now display new shift/reduce expectations |
10 | # |
11 | # Revision 4.0.1.2 91/11/05 19:19:04 lwall |
12 | # patch11: random cleanup |
13 | # |
14 | # Revision 4.0.1.1 91/06/07 12:12:14 lwall |
15 | # patch4: cflags now emits entire cc command except for the filename |
16 | # |
17 | # Revision 4.0 91/03/20 01:57:03 lwall |
18 | # 4.0 baseline. |
19 | # |
20 | # |
21 | |
22 | CC = cc |
2304df62 |
23 | YACC = yacc |
79072805 |
24 | bin = /usr/local/bin |
2304df62 |
25 | lib = /usr/local/lib |
26 | mansrc = /usr/local/man/man1 |
27 | manext = 1 |
79072805 |
28 | LDFLAGS = |
29 | SMALL = |
30 | LARGE = |
31 | mallocsrc = malloc.c |
32 | mallocobj = malloc.o |
33 | shellflags = |
34 | |
2304df62 |
35 | libs = -ldl -lm -lposix |
79072805 |
36 | |
37 | CCCMD = `sh $(shellflags) cflags $@` |
38 | |
39 | public = a2p s2p find2perl |
40 | |
41 | private = |
42 | |
43 | manpages = a2p.man s2p.man |
44 | |
45 | util = |
46 | |
47 | sh = Makefile.SH makedepend.SH |
48 | |
49 | h = EXTERN.h INTERN.h ../config.h handy.h hash.h a2p.h str.h util.h |
50 | |
51 | c = hash.c $(mallocsrc) str.c util.c walk.c |
52 | |
53 | obj = hash.o $(mallocobj) str.o util.o walk.o |
54 | |
55 | lintflags = -phbvxac |
56 | |
57 | addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7 |
58 | |
59 | # grrr |
60 | SHELL = /bin/sh |
61 | |
62 | .c.o: |
63 | $(CCCMD) $*.c |
64 | |
65 | all: $(public) $(private) $(util) |
66 | touch all |
67 | |
68 | a2p: $(obj) a2p.o |
69 | $(CC) $(LDFLAGS) $(obj) a2p.o $(libs) -o a2p |
70 | |
71 | a2p.c: a2p.y |
72 | @ echo Expect 231 shift/reduce conflicts... |
73 | $(YACC) a2p.y |
74 | mv y.tab.c a2p.c |
75 | |
76 | a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h str.h hash.h |
77 | $(CCCMD) $(LARGE) a2p.c |
78 | |
79 | install: a2p s2p |
80 | # won't work with csh |
81 | export PATH || exit 1 |
82 | - mv $(bin)/a2p $(bin)/a2p.old 2>/dev/null |
83 | - mv $(bin)/s2p $(bin)/s2p.old 2>/dev/null |
84 | - if test `pwd` != $(bin); then cp $(public) $(bin); fi |
85 | cd $(bin); \ |
86 | for pub in $(public); do \ |
87 | chmod +x `basename $$pub`; \ |
88 | done |
89 | - if test `pwd` != $(mansrc); then \ |
90 | for page in $(manpages); do \ |
91 | cp $$page $(mansrc)/`basename $$page .man`.$(manext); \ |
92 | done; \ |
93 | fi |
94 | |
95 | clean: |
96 | rm -f a2p *.o a2p.c |
97 | |
98 | realclean: clean |
99 | rm -f *.orig */*.orig core $(addedbyconf) a2p.c s2p find2perl all cflags |
100 | |
101 | # The following lint has practically everything turned on. Unfortunately, |
102 | # you have to wade through a lot of mumbo jumbo that can't be suppressed. |
103 | # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message |
104 | # for that spot. |
105 | |
106 | lint: |
107 | lint $(lintflags) $(defs) $(c) > a2p.fuzz |
108 | |
109 | depend: $(mallocsrc) ../makedepend |
110 | ../makedepend |
111 | |
112 | clist: |
113 | echo $(c) | tr ' ' '\012' >.clist |
114 | |
115 | hlist: |
116 | echo $(h) | tr ' ' '\012' >.hlist |
117 | |
118 | shlist: |
119 | echo $(sh) | tr ' ' '\012' >.shlist |
120 | |
121 | config.sh: ../config.sh |
122 | rm -f config.sh |
123 | ln ../config.sh . |
124 | |
125 | malloc.c: ../malloc.c |
126 | sed <../malloc.c >malloc.c \ |
127 | -e 's/"perl.h"/"..\/perl.h"/' \ |
128 | -e 's/my_exit/exit/' |
129 | |
130 | # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE |
131 | # If this runs make out of memory, delete /usr/include lines. |
79072805 |
132 | hash.o: ../config.h |
2304df62 |
133 | hash.o: /usr/include/ctype.h |
134 | hash.o: /usr/include/stdio.h |
79072805 |
135 | hash.o: EXTERN.h |
136 | hash.o: a2p.h |
137 | hash.o: handy.h |
138 | hash.o: hash.c |
139 | hash.o: hash.h |
140 | hash.o: str.h |
141 | hash.o: util.h |
79072805 |
142 | malloc.o: ../av.h |
143 | malloc.o: ../config.h |
144 | malloc.o: ../cop.h |
2304df62 |
145 | malloc.o: ../cv.h |
79072805 |
146 | malloc.o: ../embed.h |
147 | malloc.o: ../form.h |
148 | malloc.o: ../gv.h |
149 | malloc.o: ../handy.h |
150 | malloc.o: ../hv.h |
2304df62 |
151 | malloc.o: ../mg.h |
79072805 |
152 | malloc.o: ../op.h |
153 | malloc.o: ../opcode.h |
154 | malloc.o: ../perl.h |
79072805 |
155 | malloc.o: ../pp.h |
156 | malloc.o: ../proto.h |
157 | malloc.o: ../regexp.h |
2304df62 |
158 | malloc.o: ../scope.h |
79072805 |
159 | malloc.o: ../sv.h |
160 | malloc.o: ../unixish.h |
161 | malloc.o: ../util.h |
2304df62 |
162 | malloc.o: /usr/include/ctype.h |
163 | malloc.o: /usr/include/dirent.h |
164 | malloc.o: /usr/include/errno.h |
165 | malloc.o: /usr/include/machine/param.h |
166 | malloc.o: /usr/include/machine/setjmp.h |
167 | malloc.o: /usr/include/netinet/in.h |
168 | malloc.o: /usr/include/setjmp.h |
169 | malloc.o: /usr/include/stdio.h |
170 | malloc.o: /usr/include/sys/dirent.h |
171 | malloc.o: /usr/include/sys/errno.h |
172 | malloc.o: /usr/include/sys/filio.h |
173 | malloc.o: /usr/include/sys/ioccom.h |
174 | malloc.o: /usr/include/sys/ioctl.h |
175 | malloc.o: /usr/include/sys/param.h |
176 | malloc.o: /usr/include/sys/signal.h |
177 | malloc.o: /usr/include/sys/sockio.h |
178 | malloc.o: /usr/include/sys/stat.h |
179 | malloc.o: /usr/include/sys/stdtypes.h |
180 | malloc.o: /usr/include/sys/sysmacros.h |
181 | malloc.o: /usr/include/sys/time.h |
182 | malloc.o: /usr/include/sys/times.h |
183 | malloc.o: /usr/include/sys/ttold.h |
184 | malloc.o: /usr/include/sys/ttychars.h |
185 | malloc.o: /usr/include/sys/ttycom.h |
186 | malloc.o: /usr/include/sys/ttydev.h |
187 | malloc.o: /usr/include/sys/types.h |
188 | malloc.o: /usr/include/time.h |
189 | malloc.o: /usr/include/varargs.h |
190 | malloc.o: /usr/include/vm/faultcode.h |
79072805 |
191 | malloc.o: EXTERN.h |
192 | malloc.o: malloc.c |
79072805 |
193 | str.o: ../config.h |
2304df62 |
194 | str.o: /usr/include/ctype.h |
195 | str.o: /usr/include/stdio.h |
79072805 |
196 | str.o: EXTERN.h |
197 | str.o: a2p.h |
198 | str.o: handy.h |
199 | str.o: hash.h |
200 | str.o: str.c |
201 | str.o: str.h |
202 | str.o: util.h |
79072805 |
203 | util.o: ../config.h |
2304df62 |
204 | util.o: /usr/include/ctype.h |
205 | util.o: /usr/include/stdio.h |
79072805 |
206 | util.o: EXTERN.h |
207 | util.o: INTERN.h |
208 | util.o: a2p.h |
209 | util.o: handy.h |
210 | util.o: hash.h |
211 | util.o: str.h |
212 | util.o: util.c |
213 | util.o: util.h |
79072805 |
214 | walk.o: ../config.h |
2304df62 |
215 | walk.o: /usr/include/ctype.h |
216 | walk.o: /usr/include/stdio.h |
79072805 |
217 | walk.o: EXTERN.h |
218 | walk.o: a2p.h |
219 | walk.o: handy.h |
220 | walk.o: hash.h |
221 | walk.o: str.h |
222 | walk.o: util.h |
223 | walk.o: walk.c |
224 | Makefile: Makefile.SH config.sh ; /bin/sh Makefile.SH |
225 | makedepend: makedepend.SH config.sh ; /bin/sh makedepend.SH |
226 | # WARNING: Put nothing here or make depend will gobble it up! |