xref: /original-bsd/share/man/man0/Makefile (revision 3705696b)
1#
2# Copyright (c) 1986, 1993 Regents of the University of California.
3# All rights reserved.
4#
5#	@(#)Makefile	8.1 (Berkeley) 07/05/93
6#
7SRCS=	man1 man2 man3 man4 man5 man6 man7 man8
8
9MACROS=	-ms
10PRINTER=Pps
11TBL=	tbl
12TROFF=	groff
13
14all: title.urm.${PRINTER} preface.${PRINTER} intro.${PRINTER} \
15     toc.${PRINTER} ptx.${PRINTER} title.prm.${PRINTER}
16
17print: title.urm.${PRINTER} preface.${PRINTER} intro.${PRINTER} \
18     toc.${PRINTER} ptx.${PRINTER} title.prm.${PRINTER}
19	lpr -${PRINTER} title.urm.${PRINTER}
20	lpr -${PRINTER} preface.${PRINTER}
21	lpr -${PRINTER} intro.${PRINTER}
22	lpr -${PRINTER} toc.${PRINTER}
23	lpr -${PRINTER} ptx.${PRINTER}
24	lpr -${PRINTER} title.prm.${PRINTER}
25
26title.urm.${PRINTER}: title.urm
27	${TROFF} title.urm >title.urm.${PRINTER}
28
29preface.${PRINTER}: preface.ms
30	${TBL} preface.ms | ${TROFF} ${MACROS} >preface.${PRINTER}
31
32intro.${PRINTER}: intro.ms
33	${TROFF} ${MACROS} intro.ms >intro.${PRINTER}
34
35toc.${PRINTER}: ${SRCS} toc.in ptxx
36	${TROFF} toc.in >toc.${PRINTER}
37
38ptx.${PRINTER}: ${SRCS} ptx.in ptxx
39	${TROFF} ptx.in >ptx.${PRINTER}
40
41title.prm.${PRINTER}: ${SRCS} title.prm ptxx
42	${TROFF} title.prm >title.prm.${PRINTER}
43
44ptxx:
45	./tocrc
46
47man1pages: man1
48	rm -f man1.out
49	for i in `cat man1`; do \
50		sed -f groff.sed $$i | groff -man >>man1pages; \
51	done;
52
53man2pages: man2
54	rm -f man2.out
55	for i in `cat man2`; do groff -man $$i >>man2pages; done;
56
57man3pages: man3
58	rm -f man3.out
59	for i in `cat man3`; do groff -man $$i >>man3pages; done;
60
61man4pages: man4
62	rm -f man4.out
63	for i in `cat man4`; do groff -man $$i >>man4pages; done;
64
65man5pages: man5
66	rm -f man5.out
67	for i in `cat man5`; do \
68		sed -f groff.sed $$i | groff -man >>man5pages; \
69	done;
70
71man6pages: man6
72	rm -f man6.out
73	for i in `cat man6`; do groff -man $$i >>man6pages; done;
74
75man7pages: man7
76	rm -f man7.out
77	for i in `cat man7`; do \
78		sed -f groff.sed $$i | groff -man >>man7pages; \
79	done;
80
81man8pages: man8
82	rm -f man8.out
83	for i in `cat man8`; do groff -man $$i >>man8pages; done;
84
85clean:
86	rm -f title.urm.[PT]* preface.[PT]* intro.[PT]* toc.[PT]* ptx.[PT]* \
87	title.prm.[PT]* toc? tocx? ptxx *.spell errs Errs make.out
88