1 1.29 tv # $NetBSD: bsd.nls.mk,v 1.29 2001/08/14 07:02:13 tv Exp $ 2 1.1 jtc 3 1.11 enami .if !target(__initialized__) 4 1.11 enami __initialized__: 5 1.1 jtc .if exists(${.CURDIR}/../Makefile.inc) 6 1.1 jtc .include "${.CURDIR}/../Makefile.inc" 7 1.1 jtc .endif 8 1.5 mycroft .MAIN: all 9 1.1 jtc .endif 10 1.26 mycroft 11 1.5 mycroft .PHONY: cleannls nlsinstall 12 1.29 tv cleandir: cleannls 13 1.1 jtc 14 1.1 jtc .SUFFIXES: .cat .msg 15 1.1 jtc 16 1.1 jtc .msg.cat: 17 1.1 jtc @rm -f ${.TARGET} 18 1.1 jtc gencat ${.TARGET} ${.IMPSRC} 19 1.1 jtc 20 1.2 jtc .if defined(NLS) && !empty(NLS) 21 1.1 jtc NLSALL= ${NLS:.msg=.cat} 22 1.21 erh .NOPATH: ${NLSALL} 23 1.1 jtc 24 1.26 mycroft NLSNAME?=${PROG:Ulib${LIB}} 25 1.1 jtc 26 1.17 lukem .if ${MKNLS} != "no" 27 1.26 mycroft realinstall: nlsinstall 28 1.20 mycroft realall: ${NLSALL} 29 1.10 mycroft .endif 30 1.1 jtc 31 1.1 jtc cleannls: 32 1.1 jtc rm -f ${NLSALL} 33 1.4 christos 34 1.24 mycroft nlsinstall:: ${DESTDIR}${NLSDIR} 35 1.24 mycroft .PRECIOUS:: ${DESTDIR}${NLSDIR} 36 1.24 mycroft .PHONY:: ${DESTDIR}${NLSDIR} 37 1.24 mycroft 38 1.24 mycroft ${DESTDIR}${NLSDIR}: 39 1.24 mycroft @if [ ! -d ${.TARGET} ] || [ -h ${.TARGET} ] ; then \ 40 1.24 mycroft echo creating ${.TARGET}; \ 41 1.24 mycroft /bin/rm -rf ${.TARGET}; \ 42 1.24 mycroft ${INSTALL} ${INSTPRIV} -d -o ${NLSOWN} -g ${NLSGRP} -m 755 \ 43 1.24 mycroft ${.TARGET}; \ 44 1.24 mycroft fi 45 1.24 mycroft 46 1.22 mycroft nlsinstall:: ${NLSALL:@F@${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat@} 47 1.23 mycroft .PRECIOUS: ${NLSALL:@F@${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat@} 48 1.4 christos .if !defined(UPDATE) 49 1.22 mycroft .PHONY: ${NLSALL:@F@${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat@} 50 1.4 christos .endif 51 1.22 mycroft 52 1.24 mycroft __nlsinstall: .USE 53 1.25 matt ${INSTALL} ${INSTPRIV} -d -o ${NLSOWN} -g ${NLSGRP} ${.TARGET:H} 54 1.24 mycroft ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${NLSOWN} \ 55 1.24 mycroft -g ${NLSGRP} -m ${NLSMODE} ${.ALLSRC} ${.TARGET} 56 1.24 mycroft 57 1.27 sommerfe .for F in ${NLSALL:O:u} 58 1.19 fredb .if !defined(BUILD) && !make(all) && !make(${F}) 59 1.4 christos ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: .MADE 60 1.1 jtc .endif 61 1.24 mycroft ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: ${F} __nlsinstall 62 1.4 christos .endfor 63 1.8 mycroft .else 64 1.8 mycroft cleannls: 65 1.4 christos .endif 66