1 1.24 mycroft # $NetBSD: bsd.nls.mk,v 1.24 2000/06/06 09:53:30 mycroft 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.1 jtc 9 1.5 mycroft .MAIN: all 10 1.1 jtc .endif 11 1.5 mycroft .PHONY: cleannls nlsinstall 12 1.17 lukem .if ${MKNLS} != "no" 13 1.9 mycroft realinstall: nlsinstall 14 1.10 mycroft .endif 15 1.12 lukem cleandir distclean: cleannls 16 1.1 jtc 17 1.1 jtc .SUFFIXES: .cat .msg 18 1.1 jtc 19 1.1 jtc .msg.cat: 20 1.1 jtc @rm -f ${.TARGET} 21 1.1 jtc gencat ${.TARGET} ${.IMPSRC} 22 1.1 jtc 23 1.2 jtc .if defined(NLS) && !empty(NLS) 24 1.1 jtc NLSALL= ${NLS:.msg=.cat} 25 1.21 erh .NOPATH: ${NLSALL} 26 1.2 jtc .endif 27 1.1 jtc 28 1.1 jtc .if !defined(NLSNAME) 29 1.1 jtc .if defined(PROG) 30 1.1 jtc NLSNAME=${PROG} 31 1.1 jtc .else 32 1.1 jtc NLSNAME=lib${LIB} 33 1.1 jtc .endif 34 1.1 jtc .endif 35 1.1 jtc 36 1.1 jtc .if defined(NLSALL) 37 1.17 lukem .if ${MKNLS} != "no" 38 1.20 mycroft realall: ${NLSALL} 39 1.10 mycroft .endif 40 1.1 jtc 41 1.1 jtc cleannls: 42 1.1 jtc rm -f ${NLSALL} 43 1.4 christos 44 1.24 mycroft nlsinstall:: ${DESTDIR}${NLSDIR} 45 1.24 mycroft .PRECIOUS:: ${DESTDIR}${NLSDIR} 46 1.24 mycroft .PHONY:: ${DESTDIR}${NLSDIR} 47 1.24 mycroft 48 1.24 mycroft ${DESTDIR}${NLSDIR}: 49 1.24 mycroft @if [ ! -d ${.TARGET} ] || [ -h ${.TARGET} ] ; then \ 50 1.24 mycroft echo creating ${.TARGET}; \ 51 1.24 mycroft /bin/rm -rf ${.TARGET}; \ 52 1.24 mycroft ${INSTALL} ${INSTPRIV} -d -o ${NLSOWN} -g ${NLSGRP} -m 755 \ 53 1.24 mycroft ${.TARGET}; \ 54 1.24 mycroft fi 55 1.24 mycroft 56 1.22 mycroft nlsinstall:: ${NLSALL:@F@${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat@} 57 1.23 mycroft .PRECIOUS: ${NLSALL:@F@${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat@} 58 1.4 christos .if !defined(UPDATE) 59 1.22 mycroft .PHONY: ${NLSALL:@F@${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat@} 60 1.4 christos .endif 61 1.22 mycroft 62 1.24 mycroft __nlsinstall: .USE 63 1.24 mycroft ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${NLSOWN} \ 64 1.24 mycroft -g ${NLSGRP} -m ${NLSMODE} ${.ALLSRC} ${.TARGET} 65 1.24 mycroft 66 1.22 mycroft .for F in ${NLSALL} 67 1.19 fredb .if !defined(BUILD) && !make(all) && !make(${F}) 68 1.4 christos ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: .MADE 69 1.1 jtc .endif 70 1.24 mycroft ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: ${F} __nlsinstall 71 1.4 christos .endfor 72 1.8 mycroft .else 73 1.8 mycroft cleannls: 74 1.7 mycroft .endif 75 1.7 mycroft 76 1.7 mycroft .if !target(nlsinstall) 77 1.4 christos nlsinstall:: 78 1.4 christos .endif 79