From 8c218dc01b376e7a560d2b7fcbacca532b75fe4b Mon Sep 17 00:00:00 2001 From: nia Date: Sun, 24 May 2020 05:35:51 +0000 Subject: Import bmake- --- devel/bmake/files/mk/nls.mk | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 devel/bmake/files/mk/nls.mk (limited to 'devel/bmake/files/mk/nls.mk') diff --git a/devel/bmake/files/mk/nls.mk b/devel/bmake/files/mk/nls.mk new file mode 100644 index 00000000000..fefdeefc9ba --- /dev/null +++ b/devel/bmake/files/mk/nls.mk @@ -0,0 +1,47 @@ +# $NetBSD: nls.mk,v 1.1.1.1 2020/05/24 05:35:53 nia Exp $ + +.if !target(.MAIN) +# init.mk not included +.-include <${.CURDIR:H}/Makefile.inc> + +.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 -- cgit v1.2.3