Merge commit '4ec4134be29a3b00791f6d70074168a6a3ff4fb3'
[unleashed/tickless.git] / share / mk / doc.mk
blob38b47cf97153726e411ca685589cf8bbc6aa7310
1 # $Id: doc.mk,v 1.6 2017/05/01 21:24:10 sjg Exp $
3 .if !target(__${.PARSEFILE}__)
4 __${.PARSEFILE}__:
6 BIB?= bib
7 EQN?= eqn
8 GREMLIN?= grn
9 GRIND?= vgrind -f
10 INDXBIB?= indxbib
11 PIC?= pic
12 REFER?= refer
13 ROFF?= groff -M/usr/share/tmac ${MACROS} ${PAGES}
14 SOELIM?= soelim
15 TBL?= tbl
17 .PATH: ${.CURDIR}
19 .if !target(all)
20 .MAIN: all
21 all: paper.ps
22 .endif
24 .if !target(paper.ps)
25 paper.ps: ${SRCS}
26 ${ROFF} ${SRCS} > ${.TARGET}
27 .endif
29 .if !target(print)
30 print: paper.ps
31 lpr -P${PRINTER} paper.ps
32 .endif
34 .if !target(manpages)
35 manpages:
36 .endif
38 .if !target(obj)
39 obj:
40 .endif
42 clean cleandir:
43 rm -f paper.* [eE]rrs mklog ${CLEANFILES}
45 .if ${MK_DOC} == "no"
46 install:
47 .else
48 FILES?= ${SRCS}
49 install:
50 ${INSTALL} -d ${DOC_INSTALL_OWN} -m ${DIRMODE} ${DESTDIR}${DOCDIR}/${DIR}
51 ${INSTALL} ${COPY} ${DOC_INSTALL_OWN} -m ${DOCMODE} \
52 Makefile ${FILES} ${EXTRA} ${DESTDIR}${DOCDIR}/${DIR}
53 .endif
55 spell: ${SRCS}
56 spell ${SRCS} | sort | comm -23 - spell.ok > paper.spell
58 .include <own.mk>
60 .if !empty(DOCOWN)
61 DOC_INSTALL_OWN?= -o ${DOCOWN} -g ${DOCGRP}
62 .endif
64 .endif