bsd.nls.mk revision 1.1 1 # $NetBSD: bsd.nls.mk,v 1.1 1995/04/20 05:09:34 jtc 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 NLSALL= ${NLS:.msg=.cat}
18
19 .if !defined(NLSNAME)
20 .if defined(PROG)
21 NLSNAME=${PROG}
22 .else
23 NLSNAME=lib${LIB}
24 .endif
25 .endif
26
27 nlsinstall:
28 .if defined(NLSALL)
29 @for msg in ${NLSALL}; do \
30 NLSLANG=`basename $$msg .cat`; \
31 dir=${DESTDIR}${NLSDIR}/$${NLSLANG}; \
32 install -d $$dir; \
33 install ${COPY} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} $$msg $$dir/${NLSNAME}.cat; \
34 done
35 .endif
36
37 .if defined(NLSALL)
38 all: ${NLSALL}
39
40 install: nlsinstall
41
42 cleandir: cleannls
43 cleannls:
44 rm -f ${NLSALL}
45 .endif
46