1 1.55 bjh21 # $NetBSD: bsd.doc.mk,v 1.55 2001/11/18 15:11:25 bjh21 Exp $ 2 1.19 cgd # @(#)bsd.doc.mk 8.1 (Berkeley) 8/14/93 3 1.1 cgd 4 1.53 tv .include <bsd.init.mk> 5 1.28 mycroft 6 1.53 tv ##### Basic targets 7 1.29 mycroft .PHONY: cleandoc docinstall print spell 8 1.53 tv clean: cleandoc 9 1.32 mycroft realinstall: docinstall 10 1.26 mycroft 11 1.53 tv ##### Default values 12 1.8 cgd EQN?= eqn 13 1.8 cgd GREMLIN?= grn 14 1.1 cgd GRIND?= vgrind -f 15 1.1 cgd INDXBIB?= indxbib 16 1.8 cgd PIC?= pic 17 1.1 cgd REFER?= refer 18 1.54 tv ROFF?= ${GROFF} -Tps 19 1.1 cgd SOELIM?= soelim 20 1.8 cgd TBL?= tbl 21 1.1 cgd 22 1.53 tv ##### Build rules 23 1.18 cgd .if !target(paper.ps) 24 1.18 cgd paper.ps: ${SRCS} 25 1.52 tv ${ROFF} ${MACROS} ${PAGES} ${.ALLSRC} > ${.TARGET} 26 1.18 cgd .endif 27 1.8 cgd 28 1.53 tv .if ${MKSHARE} != "no" 29 1.53 tv realall: paper.ps 30 1.1 cgd .endif 31 1.1 cgd 32 1.53 tv ##### Install rules 33 1.53 tv docinstall:: # ensure existence 34 1.53 tv .if ${MKDOC} != "no" 35 1.14 mycroft 36 1.53 tv __docinstall: .USE 37 1.53 tv ${INSTALL_FILE} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} \ 38 1.53 tv ${.ALLSRC} ${.TARGET} 39 1.46 mycroft 40 1.53 tv FILES?= ${SRCS} 41 1.46 mycroft 42 1.53 tv .for F in Makefile ${FILES:O:u} ${EXTRA} 43 1.53 tv _F:= ${DESTDIR}${DOCDIR}/${DIR}/${F} # installed path 44 1.48 mycroft 45 1.53 tv ${_F}: ${F} __docinstall # install rule 46 1.53 tv docinstall:: ${_F} 47 1.53 tv .PRECIOUS: ${_F} # keep if install fails 48 1.53 tv .PHONY: ${UPDATE:U${_F}} # clobber unless UPDATE 49 1.43 fredb .if !defined(BUILD) && !make(all) && !make(${F}) 50 1.53 tv ${_F}: .MADE # no build at install 51 1.23 christos .endif 52 1.23 christos .endfor 53 1.28 mycroft 54 1.53 tv .undef _F 55 1.53 tv .endif # ${MKDOC} != "no" 56 1.53 tv 57 1.53 tv ##### Clean rules 58 1.53 tv cleandoc: 59 1.53 tv rm -f paper.* [eE]rrs mklog ${CLEANFILES} 60 1.53 tv 61 1.53 tv ##### Custom rules 62 1.53 tv .if !target(print) 63 1.53 tv print: paper.ps 64 1.53 tv lpr -P${PRINTER} ${.ALLSRC} 65 1.22 perry .endif 66 1.1 cgd 67 1.1 cgd spell: ${SRCS} 68 1.36 christos spell ${.ALLSRC} | sort | comm -23 - spell.ok > paper.spell 69 1.31 mycroft 70 1.53 tv ##### Pull in related .mk logic 71 1.53 tv .include <bsd.obj.mk> 72 1.55 bjh21 .include <bsd.sys.mk> 73 1.45 tron 74 1.53 tv ${TARGETS}: # ensure existence 75