Annotation of src/share/mk/bsd.nls.mk, Revision 1.7
1.7 ! deraadt 1: # $OpenBSD: bsd.nls.mk,v 1.6 2002/11/21 03:08:44 marc Exp $
1.3 mickey 2: # $NetBSD: bsd.nls.mk,v 1.2 1995/04/27 18:05:38 jtc Exp $
1.1 deraadt 3:
4: .if !target(.MAIN)
5: .MAIN: all
6: .endif
7:
8: .SUFFIXES: .cat .msg
9:
10: .msg.cat:
11: @rm -f ${.TARGET}
12: gencat ${.TARGET} ${.IMPSRC}
13:
14: .if defined(NLS) && !empty(NLS)
15: NLSALL= ${NLS:.msg=.cat}
16: .endif
17:
18: .if !defined(NLSNAME)
19: .if defined(PROG)
20: NLSNAME=${PROG}
21: .else
22: NLSNAME=lib${LIB}
23: .endif
24: .endif
25:
26: nlsinstall:
27: .if defined(NLSALL)
28: @for msg in ${NLSALL}; do \
29: NLSLANG=`basename $$msg .cat`; \
30: dir=${DESTDIR}${NLSDIR}/$${NLSLANG}; \
1.7 ! deraadt 31: echo ${INSTALL} -d $$dir; \
1.4 downsj 32: ${INSTALL} -d $$dir; \
1.7 ! deraadt 33: echo ${INSTALL} ${INSTALL_COPY} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} $$msg $$dir/${NLSNAME}.cat; \
1.5 millert 34: ${INSTALL} ${INSTALL_COPY} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} $$msg $$dir/${NLSNAME}.cat; \
1.1 deraadt 35: done
36: .endif
37:
38: .if defined(NLSALL)
39: all: ${NLSALL}
40:
41: install: nlsinstall
42:
43: cleandir: cleannls
44: cleannls:
45: rm -f ${NLSALL}
46: .endif