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