1 1.41 lukem # $NetBSD: bsd.nls.mk,v 1.41 2003/07/18 08:26:08 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.39 lukem ${TOOL_GENCAT} ${.TARGET} ${.IMPSRC} 28 1.1 jtc 29 1.31 tv .endif # ${MKNLS} != "no" 30 1.1 jtc 31 1.31 tv ##### Install rules 32 1.31 tv nlsinstall:: # ensure existence 33 1.17 lukem .if ${MKNLS} != "no" 34 1.24 mycroft 35 1.24 mycroft __nlsinstall: .USE 36 1.32 tv ${INSTALL_FILE} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} \ 37 1.38 perry ${SYSPKGTAG} ${.ALLSRC} ${.TARGET} 38 1.24 mycroft 39 1.27 sommerfe .for F in ${NLSALL:O:u} 40 1.31 tv _F:= ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat # installed path 41 1.31 tv 42 1.41 lukem .if ${MKUPDATE} == "no" 43 1.37 mycroft ${_F}! ${F} __nlsinstall # install rule 44 1.37 mycroft .if !defined(BUILD) && !make(all) && !make(${F}) 45 1.37 mycroft ${_F}! .MADE # no build at install 46 1.37 mycroft .endif 47 1.37 mycroft .else 48 1.31 tv ${_F}: ${F} __nlsinstall # install rule 49 1.19 fredb .if !defined(BUILD) && !make(all) && !make(${F}) 50 1.31 tv ${_F}: .MADE # no build at install 51 1.1 jtc .endif 52 1.37 mycroft .endif 53 1.37 mycroft 54 1.37 mycroft nlsinstall:: ${_F} 55 1.37 mycroft .PRECIOUS: ${_F} # keep if install fails 56 1.4 christos .endfor 57 1.31 tv 58 1.31 tv .undef _F 59 1.31 tv .endif # ${MKNLS} != "no" 60 1.31 tv 61 1.31 tv ##### Clean rules 62 1.8 mycroft cleannls: 63 1.36 tv .if ${MKNLS} != "no" && !empty(NLS) 64 1.31 tv rm -f ${NLSALL} 65 1.4 christos .endif 66 1.40 lukem 67 1.40 lukem ##### Pull in related .mk logic 68 1.40 lukem .include <bsd.obj.mk> 69 1.40 lukem .include <bsd.sys.mk> 70