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