2004-01-29 04:48:45 +03:00
|
|
|
# $NetBSD: bsd.nls.mk,v 1.45 2004/01/29 01:48:45 lukem Exp $
|
1995-04-20 09:09:34 +04:00
|
|
|
|
2001-11-02 08:21:47 +03:00
|
|
|
.include <bsd.init.mk>
|
2000-06-08 07:51:56 +04:00
|
|
|
|
2001-11-02 08:21:47 +03:00
|
|
|
##### Basic targets
|
2001-08-14 11:02:13 +04:00
|
|
|
cleandir: cleannls
|
2001-11-02 08:21:47 +03:00
|
|
|
realinstall: nlsinstall
|
1995-04-20 09:09:34 +04:00
|
|
|
|
2001-11-02 08:21:47 +03:00
|
|
|
##### Default values
|
|
|
|
NLSNAME?= ${PROG:Ulib${LIB}}
|
|
|
|
|
|
|
|
NLS?=
|
|
|
|
|
|
|
|
##### Build rules
|
|
|
|
.if ${MKNLS} != "no"
|
|
|
|
|
|
|
|
NLSALL= ${NLS:.msg=.cat}
|
|
|
|
|
|
|
|
realall: ${NLSALL}
|
|
|
|
.NOPATH: ${NLSALL}
|
2001-08-14 12:28:24 +04:00
|
|
|
|
1995-04-20 09:09:34 +04:00
|
|
|
.SUFFIXES: .cat .msg
|
|
|
|
|
|
|
|
.msg.cat:
|
|
|
|
@rm -f ${.TARGET}
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_GENCAT} ${.TARGET} ${.IMPSRC}
|
1995-04-20 09:09:34 +04:00
|
|
|
|
2001-11-02 08:21:47 +03:00
|
|
|
.endif # ${MKNLS} != "no"
|
1995-04-20 09:09:34 +04:00
|
|
|
|
2001-11-02 08:21:47 +03:00
|
|
|
##### Install rules
|
|
|
|
nlsinstall:: # ensure existence
|
2004-01-29 04:48:45 +03:00
|
|
|
.PHONY: nlsinstall
|
|
|
|
|
1999-02-12 15:38:44 +03:00
|
|
|
.if ${MKNLS} != "no"
|
1995-04-20 09:09:34 +04:00
|
|
|
|
2000-06-06 13:53:29 +04:00
|
|
|
__nlsinstall: .USE
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_INSTALL}
|
2001-11-02 21:10:00 +03:00
|
|
|
${INSTALL_FILE} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} \
|
2002-10-22 22:48:27 +04:00
|
|
|
${SYSPKGTAG} ${.ALLSRC} ${.TARGET}
|
2000-06-06 13:53:29 +04:00
|
|
|
|
2001-05-08 07:19:51 +04:00
|
|
|
.for F in ${NLSALL:O:u}
|
2001-11-02 08:21:47 +03:00
|
|
|
_F:= ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat # installed path
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
.if ${MKUPDATE} == "no"
|
2002-02-12 00:14:58 +03:00
|
|
|
${_F}! ${F} __nlsinstall # install rule
|
|
|
|
.if !defined(BUILD) && !make(all) && !make(${F})
|
|
|
|
${_F}! .MADE # no build at install
|
|
|
|
.endif
|
|
|
|
.else
|
2001-11-02 08:21:47 +03:00
|
|
|
${_F}: ${F} __nlsinstall # install rule
|
1999-09-05 01:48:33 +04:00
|
|
|
.if !defined(BUILD) && !make(all) && !make(${F})
|
2001-11-02 08:21:47 +03:00
|
|
|
${_F}: .MADE # no build at install
|
1997-04-20 02:24:30 +04:00
|
|
|
.endif
|
2002-02-12 00:14:58 +03:00
|
|
|
.endif
|
|
|
|
|
|
|
|
nlsinstall:: ${_F}
|
|
|
|
.PRECIOUS: ${_F} # keep if install fails
|
1997-04-20 02:24:30 +04:00
|
|
|
.endfor
|
2001-11-02 08:21:47 +03:00
|
|
|
|
|
|
|
.undef _F
|
|
|
|
.endif # ${MKNLS} != "no"
|
|
|
|
|
|
|
|
##### Clean rules
|
2004-01-29 04:48:45 +03:00
|
|
|
cleannls: .PHONY
|
2002-01-03 22:11:17 +03:00
|
|
|
.if ${MKNLS} != "no" && !empty(NLS)
|
2001-11-02 08:21:47 +03:00
|
|
|
rm -f ${NLSALL}
|
1997-04-20 02:24:30 +04:00
|
|
|
.endif
|
2003-07-14 04:52:12 +04:00
|
|
|
|
|
|
|
##### Pull in related .mk logic
|
|
|
|
.include <bsd.obj.mk>
|
|
|
|
.include <bsd.sys.mk>
|