SYSENTER/SYSCALL support
[minix.git] / share / mk / bsd.nls.mk
blob0fefdbe32a686159ef46aadc4d543faea232b675
1 # $NetBSD: bsd.nls.mk,v 1.47 2011/09/10 16:57:35 apb Exp $
3 .include <bsd.init.mk>
5 ##### Basic targets
6 realinstall: nlsinstall
8 ##### Default values
9 NLSNAME?= ${PROG:Ulib${LIB}}
11 NLS?=
13 ##### Build rules
14 .if ${MKNLS} != "no"
16 NLSALL= ${NLS:.msg=.cat}
18 realall: ${NLSALL}
19 .NOPATH: ${NLSALL}
21 .SUFFIXES: .cat .msg
23 .msg.cat:
24 @rm -f ${.TARGET}
25 ${_MKTARGET_CREATE}
26 ${TOOL_GENCAT} ${.TARGET} ${.IMPSRC}
28 .endif # ${MKNLS} != "no"
30 ##### Install rules
31 nlsinstall:: # ensure existence
32 .PHONY: nlsinstall
34 .if ${MKNLS} != "no"
36 __nlsinstall: .USE
37 ${_MKTARGET_INSTALL}
38 ${INSTALL_FILE} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} \
39 ${.ALLSRC} ${.TARGET}
41 .for F in ${NLSALL:O:u}
42 _F:= ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat # installed path
44 .if ${MKUPDATE} == "no"
45 ${_F}! ${F} __nlsinstall # install rule
46 .if !defined(BUILD) && !make(all) && !make(${F})
47 ${_F}! .MADE # no build at install
48 .endif
49 .else
50 ${_F}: ${F} __nlsinstall # install rule
51 .if !defined(BUILD) && !make(all) && !make(${F})
52 ${_F}: .MADE # no build at install
53 .endif
54 .endif
56 nlsinstall:: ${_F}
57 .PRECIOUS: ${_F} # keep if install fails
58 .endfor
60 .undef _F
61 .endif # ${MKNLS} != "no"
63 ##### Clean rules
64 .if ${MKNLS} != "no" && !empty(NLS)
65 CLEANDIRFILES+= ${NLSALL}
66 .endif
68 ##### Pull in related .mk logic
69 .include <bsd.obj.mk>
70 .include <bsd.sys.mk>
71 .include <bsd.clean.mk>