2000-06-08 07:51:56 +04:00
|
|
|
# $NetBSD: bsd.nls.mk,v 1.26 2000/06/08 03:51:56 mycroft Exp $
|
1995-04-20 09:09:34 +04:00
|
|
|
|
1998-04-03 08:40:42 +04:00
|
|
|
.if !target(__initialized__)
|
|
|
|
__initialized__:
|
1995-04-20 09:09:34 +04:00
|
|
|
.if exists(${.CURDIR}/../Makefile.inc)
|
|
|
|
.include "${.CURDIR}/../Makefile.inc"
|
|
|
|
.endif
|
1997-05-07 00:54:31 +04:00
|
|
|
.MAIN: all
|
1995-04-20 09:09:34 +04:00
|
|
|
.endif
|
2000-06-08 07:51:56 +04:00
|
|
|
|
1997-05-07 00:54:31 +04:00
|
|
|
.PHONY: cleannls nlsinstall
|
1998-08-09 18:46:19 +04:00
|
|
|
cleandir distclean: cleannls
|
1995-04-20 09:09:34 +04:00
|
|
|
|
|
|
|
.SUFFIXES: .cat .msg
|
|
|
|
|
|
|
|
.msg.cat:
|
|
|
|
@rm -f ${.TARGET}
|
|
|
|
gencat ${.TARGET} ${.IMPSRC}
|
|
|
|
|
1995-04-27 22:05:38 +04:00
|
|
|
.if defined(NLS) && !empty(NLS)
|
1995-04-20 09:09:34 +04:00
|
|
|
NLSALL= ${NLS:.msg=.cat}
|
2000-02-20 02:02:17 +03:00
|
|
|
.NOPATH: ${NLSALL}
|
1995-04-20 09:09:34 +04:00
|
|
|
|
2000-06-08 07:51:56 +04:00
|
|
|
NLSNAME?=${PROG:Ulib${LIB}}
|
1995-04-20 09:09:34 +04:00
|
|
|
|
1999-02-12 15:38:44 +03:00
|
|
|
.if ${MKNLS} != "no"
|
2000-06-08 07:51:56 +04:00
|
|
|
realinstall: nlsinstall
|
2000-01-22 22:31:00 +03:00
|
|
|
realall: ${NLSALL}
|
1997-10-11 12:16:24 +04:00
|
|
|
.endif
|
1995-04-20 09:09:34 +04:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2000-06-06 09:40:47 +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)
|
2000-06-06 09:40:47 +04:00
|
|
|
.PHONY: ${NLSALL:@F@${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat@}
|
1995-04-20 09:09:34 +04:00
|
|
|
.endif
|
2000-06-06 09:40:47 +04:00
|
|
|
|
2000-06-06 13:53:29 +04:00
|
|
|
__nlsinstall: .USE
|
2000-06-07 21:28:52 +04:00
|
|
|
${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}
|
|
|
|
|
2000-06-06 09:40:47 +04:00
|
|
|
.for F in ${NLSALL}
|
1999-09-05 01:48:33 +04:00
|
|
|
.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
|