]> diplodocus.org Git - nmh/blob - docs/historical/mh-jun-1982/progs/Makefile
Replaced use of snprintf() with memcpy()/memmove().
[nmh] / docs / historical / mh-jun-1982 / progs / Makefile
1 #
2 # Proprietary Rand Corporation, 1981.
3 # Further distribution of this software
4 # subject to the terms of the Rand
5 # license agreement.
6 #
7
8 # Remove the -DRAND elsewhere!
9 # In ../mh.h: define ARPANET if you are on the arpanet.
10 # In ../mh.h: define VMUNIX if you are running a berkeley system
11 JOBSLIB=#-ljobs
12
13 CFLAGS = -O $(A) -I/usr/include -I../support # -m -DRAND
14 # On a PDP/11, if the sticky bit is to be set, text must be shareable
15 CCSHARE = -n
16
17 # The following two must match entry in ../Makefile
18 BINDIR = /usr/local
19 MHDIR = /etc/mh
20 MHTMP = /usr/tmp/mh
21 LOCKDIR = /usr/spool/locks
22 NETDIR = /usr/spool/netmail
23
24 SUBS = ../subs/subs.a
25 STRINGS = ../strings/strings.a
26
27 LINT = lint
28
29 # The 'dist' program is not ready yet, and so is not listed in the CMDS
30 # See also ../man/Makefile
31 CMDS = \
32 ali \
33 comp \
34 file \
35 folder \
36 forw \
37 inc \
38 mail \
39 mhpath \
40 next \
41 news \
42 pick \
43 prev \
44 prompter \
45 repl \
46 rmf \
47 rmm \
48 scan \
49 send \
50 show
51
52 MISC = \
53 conflict \
54 deliver \
55 install-mh \
56 mhl
57
58 PROGS = $(CMDS) $(MISC) rmail
59
60 CFILES = \
61 adrformat.c \
62 adrparse.c \
63 ali.c \
64 comp.c \
65 conflict.c \
66 deliver.c \
67 dist.c \
68 file.c \
69 folder.c \
70 forw.c \
71 inc.c \
72 install-mh.c \
73 mail.c \
74 mhl.c \
75 mhpath.c \
76 news.c \
77 next.c \
78 pick.c \
79 prompter.c \
80 repl.c \
81 rmail.c \
82 rmf.c \
83 rmm.c \
84 scan.c \
85 scansub.c \
86 send.c \
87 show.c
88
89 progs: $(PROGS)
90
91 ali: ali.o $(SUBS)
92 $(CC) -o ali ali.o $(SUBS)
93
94 comp: comp.o $(SUBS) $(STRINGS)
95 $(CC) $(CCSHARE) -o comp comp.o $(SUBS) $(STRINGS)
96
97 conflict: conflict.o $(SUBS)
98 $(CC) -o conflict conflict.o $(SUBS)
99
100 deliver: deliver.o adrparse.o adrformat.o $(SUBS) $(STRINGS)
101 $(CC) $(CCSHARE) -o deliver deliver.o adrparse.o adrformat.o $(SUBS) \
102 $(STRINGS) $(JOBSLIB)
103
104 dist: dist.o annotate.o $(SUBS) $(STRINGS)
105 $(CC) -o dist dist.o annotate.o $(SUBS) $(STRINGS)
106
107 file: file.o $(SUBS) $(STRINGS)
108 $(CC) -o file file.o $(SUBS) $(STRINGS)
109
110 folder: folder.o $(SUBS) $(STRINGS)
111 $(CC) -o folder folder.o $(SUBS) $(STRINGS)
112
113 forw: forw.o annotate.o $(SUBS) $(STRINGS)
114 $(CC) -o forw forw.o annotate.o $(SUBS) $(STRINGS)
115
116 inc: inc.o scansub.o $(SUBS) $(STRINGS)
117 $(CC) $(CCSHARE) -o inc inc.o scansub.o $(SUBS) $(STRINGS)
118
119 install-mh: install-mh.o $(SUBS) $(STRINGS)
120 $(CC) -o install-mh install-mh.o $(SUBS) $(STRINGS)
121
122 mail: mail.o $(SUBS) $(STRINGS)
123 $(CC) -o mail mail.o $(SUBS) $(STRINGS)
124
125 mhpath: mhpath.o $(SUBS) $(STRINGS)
126 $(CC) -o mhpath mhpath.o $(SUBS) $(STRINGS)
127
128 mhl: mhl.o $(SUBS) $(STRINGS)
129 $(CC) -o mhl mhl.o $(SUBS) $(STRINGS)
130
131 news: news.o $(SUBS) $(STRINGS)
132 $(CC) -o news news.o $(SUBS) $(STRINGS)
133
134 next: nexthdr.o next.o $(SUBS) $(STRINGS)
135 $(CC) $(CCSHARE) -o next nexthdr.o next.o $(SUBS) $(STRINGS)
136
137 pick: pick.o grep.o $(SUBS) $(STRINGS)
138 $(CC) -o pick pick.o grep.o $(SUBS) $(STRINGS)
139
140 prev: prevhdr.o next.o $(SUBS) $(STRINGS)
141 $(CC) -o prev prevhdr.o next.o $(SUBS) $(STRINGS)
142
143 prompter: prompter.o $(SUBS) $(STRINGS)
144 $(CC) $(CCSHARE) -o prompter prompter.o $(SUBS) $(STRINGS)
145
146 repl: repl.o annotate.o adrparse.o adrformat.o $(SUBS) $(STRINGS)
147 $(CC) -o repl repl.o annotate.o adrparse.o adrformat.o $(SUBS) $(STRINGS)
148
149 rmail: rmail.o $(SUBS) $(STRINGS)
150 $(CC) -o rmail rmail.o $(SUBS) $(STRINGS)
151
152 rmf: rmf.o $(SUBS) $(STRINGS)
153 $(CC) -o rmf rmf.o $(SUBS) $(STRINGS)
154
155 rmm: rmm.o $(SUBS) $(STRINGS)
156 $(CC) -o rmm rmm.o $(SUBS) $(STRINGS)
157
158 scan: scan.o scansub.o $(SUBS) $(STRINGS)
159 $(CC) -o scan scan.o scansub.o $(SUBS) $(STRINGS)
160
161 send: send.o $(SUBS) $(STRINGS)
162 $(CC) -o send send.o $(SUBS) $(STRINGS)
163
164 show: show.o $(SUBS) $(STRINGS)
165 $(CC) $(CCSHARE) -o show show.o $(SUBS) $(STRINGS)
166
167 lint:
168 -$(LINT) ali.c -v ../subs/subs-lc | tee ali.lint
169 -$(LINT) comp.c -v ../subs/subs-lc | tee comp.lint
170 -$(LINT) conflict.c -v ../subs/subs-lc | tee conflict.lint
171 -$(LINT) deliver.c adrparse.c adrformat.c -v ../subs/subs-lc | tee deliver.lint
172 -$(LINT) dist.c -v ../subs/subs-lc | tee dist.lint
173 -$(LINT) file.c -v ../subs/subs-lc | tee file.lint
174 -$(LINT) folder.c -v ../subs/subs-lc | tee folder.lint
175 -$(LINT) forw.c annotate.c -v ../subs/subs-lc | tee forw.lint
176 -$(LINT) inc.c scansub.c -v ../subs/subs-lc | tee inc.lint
177 -$(LINT) install-mh.c -v ../subs/subs-lc | tee install.lint
178 -$(LINT) mail.c -v ../subs/subs-lc | tee mail.lint
179 -$(LINT) mhl.c -v ../subs/subs-lc | tee mhl.lint
180 -$(LINT) mhpath.c -v ../subs/subs-lc | tee mhpath.lint
181 -$(LINT) news.c -v ../subs/subs-lc | tee news.lint
182 -$(LINT) pick.c -v ../subs/subs-lc | tee pick.lint
183 -$(LINT) prevhdr.c next.c -v ../subs/subs-lc | tee prev.lint
184 -$(LINT) prompter.c -v ../subs/subs-lc | tee prompter.lint
185 -$(LINT) repl.c replsubs.c -v ../subs/subs-lc | tee repl.lint
186 -$(LINT) rmf.c -v ../subs/subs-lc | tee rmf.lint
187 -$(LINT) rmm.c -v ../subs/subs-lc | tee rmm.lint
188 -$(LINT) scan.c scansub.c -v ../subs/subs-lc | tee scan.lint
189 -$(LINT) show.c -v ../subs/subs-lc | tee show.lint
190
191 install: strip installprogs
192 -mkdir $(MHTMP)
193 -mkdir $(MHDIR)
194 -mkdir $(LOCKDIR)
195 -mkdir $(NETDIR)
196 -chmod a+x $(MISC)
197 -cd $(MHDIR); rm -f $(MISC)
198 -cp $(MISC) $(MHDIR)
199 echo Now become root and \'make installroot\'
200
201 installprogs: chmod
202 -cd $(BINDIR); rm -f $(CMDS) folders
203 -cp $(CMDS) $(BINDIR)
204 -cd $(BINDIR); ln folder folders
205
206 installroot:
207 -chmod 777 $(MHTMP)
208 -cd $(BINDIR); chmod a+x $(CMDS)
209 -cd $(MHDIR); chmod a+x $(MISC)
210 /etc/chown root $(NETDIR)
211 chmod 755 $(NETDIR)
212 -rm -f /bin/rmail
213 /etc/chown root $(LOCKDIR)
214 chmod 777 $(LOCKDIR)
215 -cp rmail /bin
216 # Setuid and Setgid:
217 -chmod 6755 /bin/rmail
218 # Sticky Bit & Setuid:
219 -/etc/chown root $(MHDIR)/deliver;chmod 5755 $(MHDIR)/deliver
220 # Sticky Bit:
221 -chmod 1755 $(BINDIR)/comp
222 -chmod 1755 $(BINDIR)/inc
223 -chmod 1755 $(BINDIR)/next
224 -chmod 1755 $(BINDIR)/prompter
225 -chmod 1755 $(BINDIR)/show
226
227 uninstall:
228 -rmdir $(MHTMP)
229 -cd $(MHDIR); rm -f $(MISC)
230 -cd $(BINDIR); rm -f $(CMDS) folders
231
232 strip:
233 -strip $(PROGS)
234
235 chmod:
236 chmod a+x $(PROGS)
237
238 pinstall:
239 -install -s comp $(BINDIR)/comp
240 -install -s file $(BINDIR)/file
241 -install -s folder $(BINDIR)/folder
242 -install -s forw $(BINDIR)/forw
243 -install -s inc $(BINDIR)/inc
244 -install -s mhl $(MHDIR)/mhl
245 -install -s mhpath $(BINDIR)/mhpath
246 -install -s next $(BINDIR)/next
247 -install -s pick $(BINDIR)/pick
248 -install -s prev $(BINDIR)/prev
249 -install -s prompter $(BINDIR)/prompter
250 -install -s repl $(BINDIR)/repl
251 -install -s rmf $(BINDIR)/rmf
252 -install -s rmm $(BINDIR)/rmm
253 -install -s scan $(BINDIR)/scan
254 -install -s send $(BINDIR)/send
255 -install -s show $(BINDIR)/show
256
257 distribution: clean rmprogs
258
259 rmprogs:
260 -rm -f $(PROGS)
261
262 clean:
263 -rm -f *.o *.lint
264
265 depend:
266 ../misc/depend.sh $(CFILES)
267
268
269 ###DEPENDENCIES Follow. Do not delete this line
270 adrformat.o: /usr/include/stdio.h
271 adrformat.o: ../mh.h
272 adrformat.o: ../adrparse.h
273 adrformat.o: /usr/include/ctype.h
274 adrparse.o: /usr/include/stdio.h
275 #adrparse.o: /usr/include/whoami.h
276 adrparse.o: ../mh.h
277 adrparse.o: ../adrparse.h
278 #adrparse.o: /usr/include/imp.h
279 adrparse.o: /usr/include/ctype.h
280 ali.o: ../mh.h
281 ali.o: /usr/include/stdio.h
282 ali.o: /usr/include/ctype.h
283 ali.o: /usr/include/pwd.h
284 ali.o: /usr/include/sys/types.h
285 comp.o: ../mh.h
286 comp.o: /usr/include/stdio.h
287 #comp.o: /usr/include/strings.h
288 comp.o: /usr/include/signal.h
289 conflict.o: /usr/include/stdio.h
290 conflict.o: /usr/include/ctype.h
291 conflict.o: /usr/include/pwd.h
292 conflict.o: /usr/include/grp.h
293 conflict.o: /usr/include/sys/types.h
294 conflict.o: /usr/include/sys/dir.h
295 conflict.o: ../mh.h
296 #conflict.o: /usr/include/mailsys.h
297 #deliver.o: /usr/include/whoami.h
298 deliver.o: ../mh.h
299 deliver.o: ../adrparse.h
300 deliver.o: /usr/include/stdio.h
301 deliver.o: /usr/include/ctype.h
302 deliver.o: /usr/include/pwd.h
303 deliver.o: /usr/include/sys/types.h
304 deliver.o: /usr/include/sys/timeb.h
305 deliver.o: /usr/include/sys/stat.h
306 deliver.o: /usr/include/signal.h
307 #deliver.o: /usr/include/strings.h
308 #deliver.o: /usr/include/mailsys.h
309 deliver.o: /usr/include/time.h
310 dist.o: ../mh.h
311 dist.o: /usr/include/stdio.h
312 dist.o: /usr/include/signal.h
313 #dist.o: /usr/include/strings.h
314 dist.o: /usr/include/sys/types.h
315 dist.o: /usr/include/sys/stat.h
316 file.o: ../mh.h
317 file.o: ../folder.h
318 file.o: /usr/include/stdio.h
319 folder.o: ../mh.h
320 folder.o: /usr/include/stdio.h
321 folder.o: /usr/include/sys/types.h
322 folder.o: /usr/include/sys/stat.h
323 #folder.o: /usr/include/strings.h
324 forw.o: ../mh.h
325 forw.o: /usr/include/stdio.h
326 forw.o: /usr/include/signal.h
327 #forw.o: /usr/include/strings.h
328 forw.o: /usr/include/sys/types.h
329 forw.o: /usr/include/sys/stat.h
330 inc.o: ../mh.h
331 inc.o: /usr/include/stdio.h
332 inc.o: /usr/include/sys/types.h
333 inc.o: /usr/include/sys/stat.h
334 inc.o: /usr/include/errno.h
335 #inc.o: /usr/include/strings.h
336 inc.o: /usr/include/signal.h
337 inc.o: scansub.h
338 install-mh.o: ../mh.h
339 install-mh.o: /usr/include/stdio.h
340 install-mh.o: /usr/include/sys/types.h
341 install-mh.o: /usr/include/sys/stat.h
342 mail.o: ../mh.h
343 mail.o: /usr/include/stdio.h
344 mail.o: /usr/include/signal.h
345 mhl.o: /usr/include/ctype.h
346 mhl.o: /usr/include/signal.h
347 mhl.o: /usr/include/setjmp.h
348 mhl.o: /usr/include/sgtty.h
349 mhl.o: /usr/include/stdio.h
350 mhl.o: ../mh.h
351 mhpath.o: ../mh.h
352 mhpath.o: /usr/include/stdio.h
353 #mhpath.o: /usr/include/strings.h
354 mhpath.o: /usr/include/ctype.h
355 news.o: ../mh.h
356 news.o: /usr/include/stdio.h
357 news.o: /usr/include/sys/types.h
358 news.o: /usr/include/sys/stat.h
359 news.o: /usr/include/sys/dir.h
360 #news.o: /usr/include/strings.h
361 news.o: /usr/include/sys/timeb.h
362 next.o: ../mh.h
363 next.o: /usr/include/stdio.h
364 #next.o: /usr/include/strings.h
365 pick.o: ../mh.h
366 pick.o: ../folder.h
367 pick.o: /usr/include/stdio.h
368 pick.o: /usr/include/signal.h
369 pick.o: /usr/include/sys/types.h
370 pick.o: /usr/include/sys/stat.h
371 prompter.o: ../mh.h
372 prompter.o: /usr/include/stdio.h
373 prompter.o: /usr/include/errno.h
374 prompter.o: /usr/include/sgtty.h
375 prompter.o: /usr/include/signal.h
376 #prompter.o: /usr/include/strings.h
377 #repl.o: /usr/include/whoami.h
378 repl.o: ../mh.h
379 repl.o: /usr/include/stdio.h
380 repl.o: /usr/include/signal.h
381 #repl.o: /usr/include/strings.h
382 repl.o: /usr/include/sys/types.h
383 repl.o: /usr/include/sys/stat.h
384 repl.o: ../adrparse.h
385 rmail.o: ../mh.h
386 #rmail.o: /usr/include/whoami.h
387 rmail.o: /usr/include/stdio.h
388 rmail.o: /usr/include/sys/types.h
389 rmail.o: /usr/include/sys/timeb.h
390 rmail.o: /usr/include/time.h
391 rmf.o: ../mh.h
392 rmf.o: /usr/include/stdio.h
393 #rmf.o: /usr/include/strings.h
394 rmm.o: ../mh.h
395 rmm.o: /usr/include/stdio.h
396 #rmm.o: /usr/include/strings.h
397 scan.o: ../mh.h
398 scan.o: /usr/include/stdio.h
399 #scan.o: /usr/include/strings.h
400 scan.o: scansub.h
401 scansub.o: ../mh.h
402 #scansub.o: /usr/include/whoami.h
403 scansub.o: /usr/include/stdio.h
404 scansub.o: /usr/include/ctype.h
405 scansub.o: /usr/include/time.h
406 scansub.o: ../adrparse.h
407 scansub.o: scansub.h
408 send.o: ../mh.h
409 send.o: /usr/include/stdio.h
410 send.o: /usr/include/sys/types.h
411 send.o: /usr/include/stat.h
412 #send.o: /usr/include/strings.h
413 send.o: /usr/include/signal.h
414 show.o: ../mh.h
415 show.o: /usr/include/stdio.h
416 #show.o: /usr/include/strings.h