2013-01-31 16:44:23 +00:00
|
|
|
# $NetBSD: bsd.nls.mk,v 1.3 1996/10/18 02:34:45 thorpej Exp $
|
|
|
|
|
|
|
|
.if !target(.MAIN)
|
2016-05-20 16:19:56 +00:00
|
|
|
# init.mk not included
|
|
|
|
.-include <${.CURDIR:H}/Makefile.inc>
|
2013-01-31 16:44:23 +00:00
|
|
|
|
|
|
|
.MAIN: all
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.SUFFIXES: .cat .msg
|
|
|
|
|
|
|
|
.msg.cat:
|
|
|
|
@rm -f ${.TARGET}
|
|
|
|
gencat ${.TARGET} ${.IMPSRC}
|
|
|
|
|
|
|
|
.if defined(NLS) && !empty(NLS)
|
|
|
|
NLSALL= ${NLS:.msg=.cat}
|
|
|
|
.NOPATH: ${NLSALL}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.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}; \
|
|
|
|
${INSTALL} -d $$dir; \
|
|
|
|
${INSTALL} ${COPY} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} $$msg $$dir/${NLSNAME}.cat; \
|
|
|
|
done
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(NLSALL)
|
|
|
|
all: ${NLSALL}
|
|
|
|
|
|
|
|
install: nlsinstall
|
|
|
|
|
|
|
|
cleandir: cleannls
|
|
|
|
cleannls:
|
|
|
|
rm -f ${NLSALL}
|
|
|
|
.endif
|