NetBSD/share/mk/bsd.nls.mk
lukem 130ab7336b Rework how MAKEVERBOSE operates:
*	Don't bother prefixing commands with a line of  ${_MKCMD}\
	and instead rely upon "make -s".  This is less intrusive on
	all the Makefiles than the former.  Idea from David Laight.

    *	Rename the variables use to print messages.  The scheme now is:
	    _MKMSG_FOO		Run  _MKMSG 'foo'
	    _MKTARGET_FOO	Run  _MKMSG_FOO ${.TARGET}
	From discussion with Alistair Crooks.
2003-10-21 10:01:19 +00:00

72 lines
1.3 KiB
Makefile

# $NetBSD: bsd.nls.mk,v 1.44 2003/10/21 10:01:21 lukem Exp $
.include <bsd.init.mk>
##### Basic targets
.PHONY: cleannls nlsinstall
cleandir: cleannls
realinstall: nlsinstall
##### Default values
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}
${_MKTARGET_CREATE}
${TOOL_GENCAT} ${.TARGET} ${.IMPSRC}
.endif # ${MKNLS} != "no"
##### Install rules
nlsinstall:: # ensure existence
.if ${MKNLS} != "no"
__nlsinstall: .USE
${_MKTARGET_INSTALL}
${INSTALL_FILE} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} \
${SYSPKGTAG} ${.ALLSRC} ${.TARGET}
.for F in ${NLSALL:O:u}
_F:= ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat # installed path
.if ${MKUPDATE} == "no"
${_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
.endif
.endif
nlsinstall:: ${_F}
.PRECIOUS: ${_F} # keep if install fails
.endfor
.undef _F
.endif # ${MKNLS} != "no"
##### Clean rules
cleannls:
.if ${MKNLS} != "no" && !empty(NLS)
rm -f ${NLSALL}
.endif
##### Pull in related .mk logic
.include <bsd.obj.mk>
.include <bsd.sys.mk>