1 1.5 mycroft # $NetBSD: bsd.nls.mk,v 1.5 1997/05/06 20:54:37 mycroft Exp $ 2 1.1 jtc 3 1.1 jtc .if !target(.MAIN) 4 1.1 jtc .if exists(${.CURDIR}/../Makefile.inc) 5 1.1 jtc .include "${.CURDIR}/../Makefile.inc" 6 1.1 jtc .endif 7 1.1 jtc 8 1.5 mycroft .MAIN: all 9 1.1 jtc .endif 10 1.5 mycroft .PHONY: cleannls nlsinstall 11 1.1 jtc 12 1.1 jtc .SUFFIXES: .cat .msg 13 1.1 jtc 14 1.1 jtc .msg.cat: 15 1.1 jtc @rm -f ${.TARGET} 16 1.1 jtc gencat ${.TARGET} ${.IMPSRC} 17 1.1 jtc 18 1.2 jtc .if defined(NLS) && !empty(NLS) 19 1.1 jtc NLSALL= ${NLS:.msg=.cat} 20 1.2 jtc .endif 21 1.1 jtc 22 1.1 jtc .if !defined(NLSNAME) 23 1.1 jtc .if defined(PROG) 24 1.1 jtc NLSNAME=${PROG} 25 1.1 jtc .else 26 1.1 jtc NLSNAME=lib${LIB} 27 1.1 jtc .endif 28 1.1 jtc .endif 29 1.1 jtc 30 1.1 jtc .if defined(NLSALL) 31 1.1 jtc all: ${NLSALL} 32 1.1 jtc 33 1.1 jtc cleandir: cleannls 34 1.1 jtc cleannls: 35 1.1 jtc rm -f ${NLSALL} 36 1.4 christos 37 1.4 christos .for F in ${NLSALL} 38 1.4 christos nlsinstall:: ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat 39 1.4 christos .if !defined(UPDATE) 40 1.4 christos .PHONY: ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat 41 1.4 christos .endif 42 1.4 christos .if !defined(BUILD) 43 1.4 christos ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: .MADE 44 1.1 jtc .endif 45 1.4 christos 46 1.4 christos ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: ${F} 47 1.4 christos ${INSTALL} -d ${.TARGET:H} 48 1.4 christos ${INSTALL} ${COPY} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} ${.ALLSRC} \ 49 1.4 christos ${.TARGET} 50 1.4 christos .endfor 51 1.4 christos .else 52 1.4 christos nlsinstall:: 53 1.4 christos .endif 54 1.4 christos 55 1.4 christos install: nlsinstall 56