1246149Ssjg# $Id: doc.mk,v 1.4 2012/11/11 22:37:02 sjg Exp $
2246149Ssjg
3246149Ssjg.if !target(__${.PARSEFILE}__)
4246149Ssjg__${.PARSEFILE}__:
5246149Ssjg
6246149SsjgBIB?=		bib
7246149SsjgEQN?=		eqn
8246149SsjgGREMLIN?=	grn
9246149SsjgGRIND?=		vgrind -f
10246149SsjgINDXBIB?=	indxbib
11246149SsjgPIC?=		pic
12246149SsjgREFER?=		refer
13246149SsjgROFF?=		groff -M/usr/share/tmac ${MACROS} ${PAGES}
14246149SsjgSOELIM?=	soelim
15246149SsjgTBL?=		tbl
16246149Ssjg
17246149Ssjg.PATH: ${.CURDIR}
18246149Ssjg
19246149Ssjg.if !target(all)
20246149Ssjg.MAIN: all
21246149Ssjgall: paper.ps
22246149Ssjg.endif
23246149Ssjg
24246149Ssjg.if !target(paper.ps)
25246149Ssjgpaper.ps: ${SRCS}
26246149Ssjg	${ROFF} ${SRCS} > ${.TARGET}
27246149Ssjg.endif
28246149Ssjg
29246149Ssjg.if !target(print)
30246149Ssjgprint: paper.ps
31246149Ssjg	lpr -P${PRINTER} paper.ps
32246149Ssjg.endif
33246149Ssjg
34246149Ssjg.if !target(manpages)
35246149Ssjgmanpages:
36246149Ssjg.endif
37246149Ssjg
38246149Ssjg.if !target(obj)
39246149Ssjgobj:
40246149Ssjg.endif
41246149Ssjg
42246149Ssjgclean cleandir:
43246149Ssjg	rm -f paper.* [eE]rrs mklog ${CLEANFILES}
44246149Ssjg
45246149Ssjg.if ${MK_DOC} == "no"
46246149Ssjginstall:
47246149Ssjg.else
48246149SsjgFILES?=	${SRCS}
49246149Ssjginstall:
50246149Ssjg	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
51246149Ssjg	    Makefile ${FILES} ${EXTRA} ${DESTDIR}${BINDIR}/${DIR}
52246149Ssjg.endif
53246149Ssjg
54246149Ssjgspell: ${SRCS}
55246149Ssjg	spell ${SRCS} | sort | comm -23 - spell.ok > paper.spell
56246149Ssjg
57246149SsjgBINDIR?=	/usr/share/doc
58246149SsjgBINGRP?=	bin
59246149SsjgBINOWN?=	bin
60246149SsjgBINMODE?=	444
61246149Ssjg
62246149Ssjg.include <own.mk>
63246149Ssjg.endif
64