bsd.nls.mk revision 1.6 1 # $NetBSD: bsd.nls.mk,v 1.6 1997/05/06 21:29:42 mycroft 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 .PHONY: cleannls nlsinstall
11
12 .SUFFIXES: .cat .msg
13
14 .msg.cat:
15 @rm -f ${.TARGET}
16 gencat ${.TARGET} ${.IMPSRC}
17
18 .if defined(NLS) && !empty(NLS)
19 NLSALL= ${NLS:.msg=.cat}
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 .if defined(NLSALL)
31 all: ${NLSALL}
32
33 cleandir: cleannls
34 cleannls:
35 rm -f ${NLSALL}
36
37 .for F in ${NLSALL}
38 nlsinstall:: ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat
39 .if !defined(UPDATE)
40 .PHONY: ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat
41 .endif
42 .if !defined(BUILD)
43 ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: .MADE
44 .endif
45
46 .PRECIOUS: ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat
47 ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: ${F}
48 ${INSTALL} -d ${.TARGET:H}
49 ${INSTALL} ${COPY} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} ${.ALLSRC} \
50 ${.TARGET}
51 .endfor
52 .else
53 nlsinstall::
54 .endif
55
56 install: nlsinstall
57