NetBSD/share/mk/bsd.nls.mk

66 lines
1.3 KiB
Makefile
Raw Normal View History

2000-06-06 13:22:00 +04:00
# $NetBSD: bsd.nls.mk,v 1.23 2000/06/06 09:22:02 mycroft Exp $
.if !target(__initialized__)
__initialized__:
.if exists(${.CURDIR}/../Makefile.inc)
.include "${.CURDIR}/../Makefile.inc"
.endif
1997-05-07 00:54:31 +04:00
.MAIN: all
.endif
1997-05-07 00:54:31 +04:00
.PHONY: cleannls nlsinstall
.if ${MKNLS} != "no"
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}
.NOPATH: ${NLSALL}
.endif
.if !defined(NLSNAME)
.if defined(PROG)
NLSNAME=${PROG}
.else
NLSNAME=lib${LIB}
.endif
.endif
.if defined(NLSALL)
.if ${MKNLS} != "no"
realall: ${NLSALL}
.endif
cleannls:
rm -f ${NLSALL}
1997-04-20 02:24:30 +04:00
nlsinstall:: ${NLSALL:@F@${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat@}
2000-06-06 13:22:00 +04:00
.PRECIOUS: ${NLSALL:@F@${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat@}
1997-04-20 02:24:30 +04:00
.if !defined(UPDATE)
.PHONY: ${NLSALL:@F@${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat@}
.endif
.for F in ${NLSALL}
.if !defined(BUILD) && !make(all) && !make(${F})
1997-04-20 02:24:30 +04:00
${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: .MADE
.endif
${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: ${F}
${INSTALL} ${INSTPRIV} -d -o ${NLSOWN} -g ${NLSGRP} ${.TARGET:H}
${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${NLSOWN} \
-g ${NLSGRP} -m ${NLSMODE} ${.ALLSRC} ${.TARGET}
1997-04-20 02:24:30 +04:00
.endfor
1997-05-07 20:45:40 +04:00
.else
cleannls:
1997-04-20 02:24:30 +04:00
.endif
1997-05-07 19:53:28 +04:00
.if !target(nlsinstall)
nlsinstall::
.endif