]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/bmake/mk/nls.mk
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / bmake / mk / nls.mk
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)
18 NLSALL= ${NLS:.msg=.cat}
19 .NOPATH: ${NLSALL}
20 .endif
21
22 .if !defined(NLSNAME)
23 .if defined(PROG)
24 NLSNAME=${PROG}
25 .else
26 NLSNAME=lib${LIB}
27 .endif
28 .endif
29
30 nlsinstall:
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)
41 all: ${NLSALL}
42
43 install:  nlsinstall
44
45 cleandir: cleannls
46 cleannls:
47         rm -f ${NLSALL}
48 .endif