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