Home | History | Annotate | Line # | Download | only in mk
bsd.nls.mk revision 1.37
      1  1.37   mycroft #	$NetBSD: bsd.nls.mk,v 1.37 2002/02/11 21:15:01 mycroft 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.24   mycroft 
     36  1.24   mycroft __nlsinstall: .USE
     37  1.32        tv 	${INSTALL_FILE} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} \
     38  1.32        tv 		${.ALLSRC} ${.TARGET}
     39  1.24   mycroft 
     40  1.27  sommerfe .for F in ${NLSALL:O:u}
     41  1.31        tv _F:=		${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat # installed path
     42  1.31        tv 
     43  1.37   mycroft .if !defined(UPDATE)
     44  1.37   mycroft ${_F}!		${F} __nlsinstall			# install rule
     45  1.37   mycroft .if !defined(BUILD) && !make(all) && !make(${F})
     46  1.37   mycroft ${_F}!		.MADE					# no build at install
     47  1.37   mycroft .endif
     48  1.37   mycroft .else
     49  1.31        tv ${_F}:		${F} __nlsinstall			# install rule
     50  1.19     fredb .if !defined(BUILD) && !make(all) && !make(${F})
     51  1.31        tv ${_F}:		.MADE					# no build at install
     52   1.1       jtc .endif
     53  1.37   mycroft .endif
     54  1.37   mycroft 
     55  1.37   mycroft nlsinstall::	${_F}
     56  1.37   mycroft .PRECIOUS:	${_F}					# keep if install fails
     57   1.4  christos .endfor
     58  1.31        tv 
     59  1.31        tv .undef _F
     60  1.31        tv .endif # ${MKNLS} != "no"
     61  1.31        tv 
     62  1.31        tv ##### Clean rules
     63   1.8   mycroft cleannls:
     64  1.36        tv .if ${MKNLS} != "no" && !empty(NLS)
     65  1.31        tv 	rm -f ${NLSALL}
     66   1.4  christos .endif
     67