NetBSD/share/mk/bsd.nls.mk

67 lines
1.2 KiB
Makefile
Raw Normal View History

# $NetBSD: bsd.nls.mk,v 1.37 2002/02/11 21:15:01 mycroft Exp $
.include <bsd.init.mk>
##### Basic targets
1997-05-07 00:54:31 +04:00
.PHONY: cleannls nlsinstall
cleandir: cleannls
realinstall: nlsinstall
##### Default values
GENCAT?= gencat
NLSNAME?= ${PROG:Ulib${LIB}}
NLS?=
##### Build rules
.if ${MKNLS} != "no"
NLSALL= ${NLS:.msg=.cat}
realall: ${NLSALL}
.NOPATH: ${NLSALL}
.SUFFIXES: .cat .msg
.msg.cat:
@rm -f ${.TARGET}
${GENCAT} ${.TARGET} ${.IMPSRC}
.endif # ${MKNLS} != "no"
##### Install rules
nlsinstall:: # ensure existence
.if ${MKNLS} != "no"
2000-06-06 13:53:29 +04:00
__nlsinstall: .USE
${INSTALL_FILE} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} \
${.ALLSRC} ${.TARGET}
2000-06-06 13:53:29 +04:00
.for F in ${NLSALL:O:u}
_F:= ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat # installed path
.if !defined(UPDATE)
${_F}! ${F} __nlsinstall # install rule
.if !defined(BUILD) && !make(all) && !make(${F})
${_F}! .MADE # no build at install
.endif
.else
${_F}: ${F} __nlsinstall # install rule
.if !defined(BUILD) && !make(all) && !make(${F})
${_F}: .MADE # no build at install
1997-04-20 02:24:30 +04:00
.endif
.endif
nlsinstall:: ${_F}
.PRECIOUS: ${_F} # keep if install fails
1997-04-20 02:24:30 +04:00
.endfor
.undef _F
.endif # ${MKNLS} != "no"
##### Clean rules
1997-05-07 20:45:40 +04:00
cleannls:
.if ${MKNLS} != "no" && !empty(NLS)
rm -f ${NLSALL}
1997-04-20 02:24:30 +04:00
.endif