Home | History | Annotate | Line # | Download | only in mk
bsd.nls.mk revision 1.33
      1  1.33     lukem #	$NetBSD: bsd.nls.mk,v 1.33 2001/11/06 10:59:15 lukem Exp $
      2   1.1       jtc 
      3  1.31        tv .include <bsd.init.mk>
      4  1.26   mycroft 
      5  1.31        tv ##### Basic targets
      6   1.5   mycroft .PHONY:		cleannls nlsinstall
      7  1.29        tv cleandir:	cleannls
      8  1.31        tv realinstall:	nlsinstall
      9   1.1       jtc 
     10  1.31        tv ##### Default values
     11  1.30        tv GENCAT?=	gencat
     12  1.31        tv NLSNAME?=	${PROG:Ulib${LIB}}
     13  1.31        tv 
     14  1.31        tv NLS?=
     15  1.31        tv 
     16  1.31        tv ##### Build rules
     17  1.31        tv .if ${MKNLS} != "no"
     18  1.31        tv 
     19  1.31        tv NLSALL=		${NLS:.msg=.cat}
     20  1.31        tv 
     21  1.31        tv realall:	${NLSALL}
     22  1.31        tv .NOPATH:	${NLSALL}
     23  1.30        tv 
     24   1.1       jtc .SUFFIXES: .cat .msg
     25   1.1       jtc 
     26   1.1       jtc .msg.cat:
     27   1.1       jtc 	@rm -f ${.TARGET}
     28  1.30        tv 	${GENCAT} ${.TARGET} ${.IMPSRC}
     29   1.1       jtc 
     30  1.31        tv .endif # ${MKNLS} != "no"
     31   1.1       jtc 
     32  1.31        tv ##### Install rules
     33  1.31        tv nlsinstall::	# ensure existence
     34  1.17     lukem .if ${MKNLS} != "no"
     35   1.1       jtc 
     36  1.31        tv nlsinstall::	${DESTDIR}${NLSDIR}
     37  1.31        tv .PRECIOUS:	${DESTDIR}${NLSDIR}
     38  1.31        tv .PHONY:		${DESTDIR}${NLSDIR}
     39  1.24   mycroft 
     40  1.24   mycroft __nlsinstall: .USE
     41  1.32        tv 	${INSTALL_FILE} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} \
     42  1.32        tv 		${.ALLSRC} ${.TARGET}
     43  1.24   mycroft 
     44  1.27  sommerfe .for F in ${NLSALL:O:u}
     45  1.31        tv _F:=		${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat # installed path
     46  1.31        tv 
     47  1.31        tv ${_F}:		${F} __nlsinstall			# install rule
     48  1.31        tv nlsinstall::	${_F}
     49  1.31        tv .PRECIOUS:	${_F}					# keep if install fails
     50  1.31        tv .PHONY:		${UPDATE:U${_F}}			# noclobber install
     51  1.19     fredb .if !defined(BUILD) && !make(all) && !make(${F})
     52  1.31        tv ${_F}:		.MADE					# no build at install
     53   1.1       jtc .endif
     54   1.4  christos .endfor
     55  1.31        tv 
     56  1.31        tv .undef _F
     57  1.31        tv .endif # ${MKNLS} != "no"
     58  1.31        tv 
     59  1.31        tv ##### Clean rules
     60   1.8   mycroft cleannls:
     61  1.31        tv .if !empty(NLS)
     62  1.31        tv 	rm -f ${NLSALL}
     63   1.4  christos .endif
     64