1 1.57 mycroft # $NetBSD: bsd.doc.mk,v 1.57 2002/02/11 21:14:58 mycroft 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.57 mycroft .if !defined(UPDATE) 46 1.57 mycroft ${_F}! ${F} __docinstall # install rule 47 1.57 mycroft .if !defined(BUILD) && !make(all) && !make(${F}) 48 1.57 mycroft ${_F}! .MADE # no build at install 49 1.57 mycroft .endif 50 1.57 mycroft .else 51 1.53 tv ${_F}: ${F} __docinstall # install rule 52 1.43 fredb .if !defined(BUILD) && !make(all) && !make(${F}) 53 1.53 tv ${_F}: .MADE # no build at install 54 1.23 christos .endif 55 1.57 mycroft .endif 56 1.57 mycroft 57 1.57 mycroft docinstall:: ${_F} 58 1.57 mycroft .PRECIOUS: ${_F} # keep if install fails 59 1.23 christos .endfor 60 1.28 mycroft 61 1.53 tv .undef _F 62 1.53 tv .endif # ${MKDOC} != "no" 63 1.53 tv 64 1.53 tv ##### Clean rules 65 1.53 tv cleandoc: 66 1.53 tv rm -f paper.* [eE]rrs mklog ${CLEANFILES} 67 1.53 tv 68 1.53 tv ##### Custom rules 69 1.53 tv .if !target(print) 70 1.53 tv print: paper.ps 71 1.53 tv lpr -P${PRINTER} ${.ALLSRC} 72 1.22 perry .endif 73 1.1 cgd 74 1.1 cgd spell: ${SRCS} 75 1.36 christos spell ${.ALLSRC} | sort | comm -23 - spell.ok > paper.spell 76 1.31 mycroft 77 1.53 tv ##### Pull in related .mk logic 78 1.53 tv .include <bsd.obj.mk> 79 1.55 bjh21 .include <bsd.sys.mk> 80 1.45 tron 81 1.53 tv ${TARGETS}: # ensure existence 82