1 1.44 lukem # $NetBSD: bsd.nls.mk,v 1.44 2003/10/21 10:01:21 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.31 tv NLSNAME?= ${PROG:Ulib${LIB}} 12 1.31 tv 13 1.31 tv NLS?= 14 1.31 tv 15 1.31 tv ##### Build rules 16 1.31 tv .if ${MKNLS} != "no" 17 1.31 tv 18 1.31 tv NLSALL= ${NLS:.msg=.cat} 19 1.31 tv 20 1.31 tv realall: ${NLSALL} 21 1.31 tv .NOPATH: ${NLSALL} 22 1.30 tv 23 1.1 jtc .SUFFIXES: .cat .msg 24 1.1 jtc 25 1.1 jtc .msg.cat: 26 1.1 jtc @rm -f ${.TARGET} 27 1.44 lukem ${_MKTARGET_CREATE} 28 1.39 lukem ${TOOL_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.44 lukem ${_MKTARGET_INSTALL} 38 1.32 tv ${INSTALL_FILE} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} \ 39 1.38 perry ${SYSPKGTAG} ${.ALLSRC} ${.TARGET} 40 1.24 mycroft 41 1.27 sommerfe .for F in ${NLSALL:O:u} 42 1.31 tv _F:= ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat # installed path 43 1.31 tv 44 1.41 lukem .if ${MKUPDATE} == "no" 45 1.37 mycroft ${_F}! ${F} __nlsinstall # install rule 46 1.37 mycroft .if !defined(BUILD) && !make(all) && !make(${F}) 47 1.37 mycroft ${_F}! .MADE # no build at install 48 1.37 mycroft .endif 49 1.37 mycroft .else 50 1.31 tv ${_F}: ${F} __nlsinstall # install rule 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.37 mycroft .endif 55 1.37 mycroft 56 1.37 mycroft nlsinstall:: ${_F} 57 1.37 mycroft .PRECIOUS: ${_F} # keep if install fails 58 1.4 christos .endfor 59 1.31 tv 60 1.31 tv .undef _F 61 1.31 tv .endif # ${MKNLS} != "no" 62 1.31 tv 63 1.31 tv ##### Clean rules 64 1.8 mycroft cleannls: 65 1.36 tv .if ${MKNLS} != "no" && !empty(NLS) 66 1.31 tv rm -f ${NLSALL} 67 1.4 christos .endif 68 1.40 lukem 69 1.40 lukem ##### Pull in related .mk logic 70 1.40 lukem .include <bsd.obj.mk> 71 1.40 lukem .include <bsd.sys.mk> 72