retire nonsymbolic rootdev, dev2name
[minix.git] / share / mk / bsd.doc.mk
blobd6fd9def97438b3efc056acda5ae32f201d99066
1 # $NetBSD: bsd.doc.mk,v 1.64 2006/03/16 18:43:34 jwise Exp $
2 # @(#)bsd.doc.mk 8.1 (Berkeley) 8/14/93
4 .include <bsd.init.mk>
6 ##### Basic targets
7 clean: cleandoc
8 realinstall: docinstall
10 ##### Build rules
11 .if !target(paper.ps)
12 paper.ps: ${SRCS}
13 ${_MKTARGET_FORMAT}
14 ${TOOL_ROFF_PS} ${MACROS} ${PAGES} ${.ALLSRC} > ${.TARGET}
15 .endif
17 .if ${MKSHARE} != "no"
18 realall: paper.ps
19 .endif
21 ##### Install rules
22 docinstall:: # ensure existence
23 .PHONY: docinstall
25 .if ${MKDOC} != "no"
27 __docinstall: .USE
28 ${_MKTARGET_INSTALL}
29 ${INSTALL_FILE} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} \
30 ${.ALLSRC} ${.TARGET}
32 FILES?= ${SRCS}
34 .for F in Makefile ${FILES:O:u} ${EXTRA}
35 _F:= ${DESTDIR}${DOCDIR}/${DIR}/${F} # installed path
37 .if ${MKUPDATE} == "no"
38 ${_F}! ${F} __docinstall # install rule
39 .if !defined(BUILD) && !make(all) && !make(${F})
40 ${_F}! .MADE # no build at install
41 .endif
42 .else
43 ${_F}: ${F} __docinstall # install rule
44 .if !defined(BUILD) && !make(all) && !make(${F})
45 ${_F}: .MADE # no build at install
46 .endif
47 .endif
49 docinstall:: ${_F}
50 .PRECIOUS: ${_F} # keep if install fails
51 .endfor
53 .undef _F
54 .endif # ${MKDOC} != "no"
56 ##### Clean rules
57 cleandoc: .PHONY
58 rm -f paper.* [eE]rrs mklog ${CLEANFILES}
60 ##### Custom rules
61 .if !target(print)
62 print: .PHONY paper.ps
63 lpr -P${PRINTER} ${.ALLSRC}
64 .endif
66 spell: .PHONY ${SRCS}
67 spell ${.ALLSRC} | sort | comm -23 - spell.ok > paper.spell
69 ##### Pull in related .mk logic
70 .include <bsd.obj.mk>
71 .include <bsd.sys.mk>
73 ${TARGETS}: # ensure existence