1# $NetBSD: bsd.nls.mk,v 1.3 1996/10/18 02:34:45 thorpej Exp $ 2 3.if !target(.MAIN) 4.if exists(${.CURDIR}/../Makefile.inc) 5.include "${.CURDIR}/../Makefile.inc" 6.endif 7 8.MAIN: all 9.endif 10 11.SUFFIXES: .cat .msg 12 13.msg.cat: 14 @rm -f ${.TARGET} 15 gencat ${.TARGET} ${.IMPSRC} 16 17.if defined(NLS) && !empty(NLS) 18NLSALL= ${NLS:.msg=.cat} 19.NOPATH: ${NLSALL} 20.endif 21 22.if !defined(NLSNAME) 23.if defined(PROG) 24NLSNAME=${PROG} 25.else 26NLSNAME=lib${LIB} 27.endif 28.endif 29 30nlsinstall: 31.if defined(NLSALL) 32 @for msg in ${NLSALL}; do \ 33 NLSLANG=`basename $$msg .cat`; \ 34 dir=${DESTDIR}${NLSDIR}/$${NLSLANG}; \ 35 ${INSTALL} -d $$dir; \ 36 ${INSTALL} ${COPY} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} $$msg $$dir/${NLSNAME}.cat; \ 37 done 38.endif 39 40.if defined(NLSALL) 41all: ${NLSALL} 42 43install: nlsinstall 44 45cleandir: cleannls 46cleannls: 47 rm -f ${NLSALL} 48.endif 49