1996-10-18 06:34:42 +04:00
|
|
|
# $NetBSD: bsd.nls.mk,v 1.3 1996/10/18 02:34:45 thorpej Exp $
|
1995-04-20 09:09:34 +04:00
|
|
|
|
|
|
|
.if !target(.MAIN)
|
|
|
|
.if exists(${.CURDIR}/../Makefile.inc)
|
|
|
|
.include "${.CURDIR}/../Makefile.inc"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.MAIN: all
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.SUFFIXES: .cat .msg
|
|
|
|
|
|
|
|
.msg.cat:
|
|
|
|
@rm -f ${.TARGET}
|
|
|
|
gencat ${.TARGET} ${.IMPSRC}
|
|
|
|
|
1995-04-27 22:05:38 +04:00
|
|
|
.if defined(NLS) && !empty(NLS)
|
1995-04-20 09:09:34 +04:00
|
|
|
NLSALL= ${NLS:.msg=.cat}
|
1995-04-27 22:05:38 +04:00
|
|
|
.endif
|
1995-04-20 09:09:34 +04:00
|
|
|
|
|
|
|
.if !defined(NLSNAME)
|
|
|
|
.if defined(PROG)
|
|
|
|
NLSNAME=${PROG}
|
|
|
|
.else
|
|
|
|
NLSNAME=lib${LIB}
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
nlsinstall:
|
|
|
|
.if defined(NLSALL)
|
|
|
|
@for msg in ${NLSALL}; do \
|
|
|
|
NLSLANG=`basename $$msg .cat`; \
|
|
|
|
dir=${DESTDIR}${NLSDIR}/$${NLSLANG}; \
|
1996-10-18 06:34:42 +04:00
|
|
|
${INSTALL} -d $$dir; \
|
|
|
|
${INSTALL} ${COPY} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} $$msg $$dir/${NLSNAME}.cat; \
|
1995-04-20 09:09:34 +04:00
|
|
|
done
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(NLSALL)
|
|
|
|
all: ${NLSALL}
|
|
|
|
|
|
|
|
install: nlsinstall
|
|
|
|
|
|
|
|
cleandir: cleannls
|
|
|
|
cleannls:
|
|
|
|
rm -f ${NLSALL}
|
|
|
|
.endif
|