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