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