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