1 1.63 lukem # $NetBSD: bsd.doc.mk,v 1.63 2004/01/29 01:48:45 lukem 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.53 tv clean: cleandoc 8 1.32 mycroft realinstall: docinstall 9 1.26 mycroft 10 1.53 tv ##### Build rules 11 1.18 cgd .if !target(paper.ps) 12 1.18 cgd paper.ps: ${SRCS} 13 1.62 lukem ${_MKTARGET_FORMAT} 14 1.59 lukem ${TOOL_ROFF_PS} ${MACROS} ${PAGES} ${.ALLSRC} > ${.TARGET} 15 1.18 cgd .endif 16 1.8 cgd 17 1.53 tv .if ${MKSHARE} != "no" 18 1.53 tv realall: paper.ps 19 1.1 cgd .endif 20 1.1 cgd 21 1.53 tv ##### Install rules 22 1.53 tv docinstall:: # ensure existence 23 1.63 lukem .PHONY: docinstall 24 1.63 lukem 25 1.53 tv .if ${MKDOC} != "no" 26 1.14 mycroft 27 1.53 tv __docinstall: .USE 28 1.62 lukem ${_MKTARGET_INSTALL} 29 1.58 perry ${INSTALL_FILE} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} ${SYSPKGTAG} \ 30 1.53 tv ${.ALLSRC} ${.TARGET} 31 1.46 mycroft 32 1.53 tv FILES?= ${SRCS} 33 1.46 mycroft 34 1.53 tv .for F in Makefile ${FILES:O:u} ${EXTRA} 35 1.53 tv _F:= ${DESTDIR}${DOCDIR}/${DIR}/${F} # installed path 36 1.48 mycroft 37 1.60 lukem .if ${MKUPDATE} == "no" 38 1.57 mycroft ${_F}! ${F} __docinstall # install rule 39 1.57 mycroft .if !defined(BUILD) && !make(all) && !make(${F}) 40 1.57 mycroft ${_F}! .MADE # no build at install 41 1.57 mycroft .endif 42 1.57 mycroft .else 43 1.53 tv ${_F}: ${F} __docinstall # install rule 44 1.43 fredb .if !defined(BUILD) && !make(all) && !make(${F}) 45 1.53 tv ${_F}: .MADE # no build at install 46 1.23 christos .endif 47 1.57 mycroft .endif 48 1.57 mycroft 49 1.57 mycroft docinstall:: ${_F} 50 1.57 mycroft .PRECIOUS: ${_F} # keep if install fails 51 1.23 christos .endfor 52 1.28 mycroft 53 1.53 tv .undef _F 54 1.53 tv .endif # ${MKDOC} != "no" 55 1.53 tv 56 1.53 tv ##### Clean rules 57 1.63 lukem cleandoc: .PHONY 58 1.53 tv rm -f paper.* [eE]rrs mklog ${CLEANFILES} 59 1.53 tv 60 1.53 tv ##### Custom rules 61 1.53 tv .if !target(print) 62 1.63 lukem print: .PHONY paper.ps 63 1.53 tv lpr -P${PRINTER} ${.ALLSRC} 64 1.22 perry .endif 65 1.1 cgd 66 1.63 lukem spell: .PHONY ${SRCS} 67 1.36 christos spell ${.ALLSRC} | sort | comm -23 - spell.ok > paper.spell 68 1.31 mycroft 69 1.53 tv ##### Pull in related .mk logic 70 1.53 tv .include <bsd.obj.mk> 71 1.55 bjh21 .include <bsd.sys.mk> 72 1.45 tron 73 1.53 tv ${TARGETS}: # ensure existence 74