NetBSD/share/mk/bsd.nls.mk

65 lines
1.2 KiB
Makefile

# $NetBSD: bsd.nls.mk,v 1.14 1998/09/28 08:13:38 christos Exp $
.if !target(__initialized__)
__initialized__:
.if exists(${.CURDIR}/../Makefile.inc)
.include "${.CURDIR}/../Makefile.inc"
.endif
.MAIN: all
.endif
.PHONY: cleannls nlsinstall
.if !defined(NONLS) && !defined(NOSHARE)
realinstall: nlsinstall
.endif
cleandir distclean: cleannls
.SUFFIXES: .cat .msg
.msg.cat:
@rm -f ${.TARGET}
gencat ${.TARGET} ${.IMPSRC}
.if defined(NLS) && !empty(NLS)
NLSALL= ${NLS:.msg=.cat}
.endif
.if !defined(NLSNAME)
.if defined(PROG)
NLSNAME=${PROG}
.else
NLSNAME=lib${LIB}
.endif
.endif
.if defined(NLSALL)
.if !defined(NONLS) && !defined(NOSHARE)
all: ${NLSALL}
.endif
cleannls:
rm -f ${NLSALL}
.for F in ${NLSALL}
nlsinstall:: ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat
.if !defined(UPDATE)
.PHONY: ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat
.endif
.if !defined(BUILD)
${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: .MADE
.endif
.PRECIOUS: ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat
${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: ${F}
${INSTALL} -d ${.TARGET:H}
${INSTALL} ${PRESERVE} ${COPY} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} \
${.ALLSRC} ${.TARGET}
.endfor
.else
cleannls:
.endif
.if !target(nlsinstall)
nlsinstall::
.endif