1 1.61 lukem # $NetBSD: bsd.doc.mk,v 1.61 2003/10/19 05:24:53 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.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 ##### Build rules 12 1.18 cgd .if !target(paper.ps) 13 1.18 cgd paper.ps: ${SRCS} 14 1.61 lukem ${_MKMSGFORMAT} 15 1.61 lukem ${_MKCMD}\ 16 1.59 lukem ${TOOL_ROFF_PS} ${MACROS} ${PAGES} ${.ALLSRC} > ${.TARGET} 17 1.18 cgd .endif 18 1.8 cgd 19 1.53 tv .if ${MKSHARE} != "no" 20 1.53 tv realall: paper.ps 21 1.1 cgd .endif 22 1.1 cgd 23 1.53 tv ##### Install rules 24 1.53 tv docinstall:: # ensure existence 25 1.53 tv .if ${MKDOC} != "no" 26 1.14 mycroft 27 1.53 tv __docinstall: .USE 28 1.61 lukem ${_MKMSGINSTALL} 29 1.61 lukem ${_MKCMD}\ 30 1.58 perry ${INSTALL_FILE} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} ${SYSPKGTAG} \ 31 1.53 tv ${.ALLSRC} ${.TARGET} 32 1.46 mycroft 33 1.53 tv FILES?= ${SRCS} 34 1.46 mycroft 35 1.53 tv .for F in Makefile ${FILES:O:u} ${EXTRA} 36 1.53 tv _F:= ${DESTDIR}${DOCDIR}/${DIR}/${F} # installed path 37 1.48 mycroft 38 1.60 lukem .if ${MKUPDATE} == "no" 39 1.57 mycroft ${_F}! ${F} __docinstall # install rule 40 1.57 mycroft .if !defined(BUILD) && !make(all) && !make(${F}) 41 1.57 mycroft ${_F}! .MADE # no build at install 42 1.57 mycroft .endif 43 1.57 mycroft .else 44 1.53 tv ${_F}: ${F} __docinstall # install rule 45 1.43 fredb .if !defined(BUILD) && !make(all) && !make(${F}) 46 1.53 tv ${_F}: .MADE # no build at install 47 1.23 christos .endif 48 1.57 mycroft .endif 49 1.57 mycroft 50 1.57 mycroft docinstall:: ${_F} 51 1.57 mycroft .PRECIOUS: ${_F} # keep if install fails 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.61 lukem ${_MKCMD}\ 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.55 bjh21 .include <bsd.sys.mk> 74 1.45 tron 75 1.53 tv ${TARGETS}: # ensure existence 76