NetBSD/share/mk/bsd.nls.mk

66 lines
1.5 KiB
Makefile
Raw Normal View History

# $NetBSD: bsd.nls.mk,v 1.26 2000/06/08 03:51:56 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
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}
NLSNAME?=${PROG:Ulib${LIB}}
.if ${MKNLS} != "no"
realinstall: nlsinstall
realall: ${NLSALL}
.endif
cleannls:
rm -f ${NLSALL}
1997-04-20 02:24:30 +04:00
2000-06-06 13:53:29 +04:00
nlsinstall:: ${DESTDIR}${NLSDIR}
.PRECIOUS:: ${DESTDIR}${NLSDIR}
.PHONY:: ${DESTDIR}${NLSDIR}
${DESTDIR}${NLSDIR}:
@if [ ! -d ${.TARGET} ] || [ -h ${.TARGET} ] ; then \
echo creating ${.TARGET}; \
/bin/rm -rf ${.TARGET}; \
${INSTALL} ${INSTPRIV} -d -o ${NLSOWN} -g ${NLSGRP} -m 755 \
${.TARGET}; \
fi
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
2000-06-06 13:53:29 +04:00
__nlsinstall: .USE
${INSTALL} ${INSTPRIV} -d -o ${NLSOWN} -g ${NLSGRP} ${.TARGET:H}
2000-06-06 13:53:29 +04:00
${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} -o ${NLSOWN} \
-g ${NLSGRP} -m ${NLSMODE} ${.ALLSRC} ${.TARGET}
.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
2000-06-06 13:53:29 +04:00
${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: ${F} __nlsinstall
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