2002-03-04 10:50:28 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# This include file <bsd.nls.mk> handles building and installing Native
|
|
|
|
# Language Support (NLS) catalogs
|
|
|
|
#
|
|
|
|
# +++ variables +++
|
|
|
|
#
|
|
|
|
# GENCAT A program for converting .msg files into compiled NLS
|
2005-03-10 16:58:16 +01:00
|
|
|
# .cat files. [gencat]
|
2002-03-04 10:50:28 +01:00
|
|
|
#
|
|
|
|
# NLS Source or intermediate .msg files. [set in Makefile]
|
|
|
|
#
|
|
|
|
# NLSDIR Base path for National Language Support files
|
|
|
|
# installation. [${SHAREDIR}/nls]
|
|
|
|
#
|
|
|
|
# NLSGRP National Language Support files group. [${SHAREGRP}]
|
|
|
|
#
|
|
|
|
# NLSMODE National Language Support files mode. [${NOBINMODE}]
|
|
|
|
#
|
|
|
|
# NLSOWN National Language Support files owner. [${SHAREOWN}]
|
|
|
|
|
2002-07-02 14:37:09 +02:00
|
|
|
.if !target(__<bsd.init.mk>__)
|
|
|
|
.error bsd.nls.mk cannot be included directly.
|
|
|
|
.endif
|
2002-04-17 15:49:29 +02:00
|
|
|
|
2005-02-27 17:36:54 +01:00
|
|
|
GENCAT?= gencat
|
2002-03-04 10:50:28 +01:00
|
|
|
|
|
|
|
.SUFFIXES: .cat .msg
|
|
|
|
|
|
|
|
.msg.cat:
|
|
|
|
${GENCAT} ${.TARGET} ${.IMPSRC}
|
|
|
|
|
2006-03-17 19:54:44 +01:00
|
|
|
.if defined(NLS) && !empty(NLS) && ${MK_NLS} != "no"
|
2002-07-02 14:37:09 +02:00
|
|
|
|
2002-03-04 10:50:28 +01:00
|
|
|
#
|
|
|
|
# .msg file pre-build rules
|
|
|
|
#
|
2002-07-02 14:37:09 +02:00
|
|
|
NLSSRCDIR?= ${.CURDIR}
|
2002-03-04 10:50:28 +01:00
|
|
|
.for file in ${NLS}
|
2002-07-02 14:37:09 +02:00
|
|
|
.if defined(NLSSRCFILES)
|
|
|
|
NLSSRCFILES_${file}?= ${NLSSRCFILES}
|
2002-03-04 11:59:37 +01:00
|
|
|
.endif
|
2002-03-04 10:50:28 +01:00
|
|
|
.if defined(NLSSRCFILES_${file})
|
2002-07-02 14:37:09 +02:00
|
|
|
NLSSRCDIR_${file}?= ${NLSSRCDIR}
|
|
|
|
${file}.msg: ${NLSSRCFILES_${file}:S/^/${NLSSRCDIR_${file}}\//}
|
2002-03-04 10:50:28 +01:00
|
|
|
@rm -f ${.TARGET}
|
2002-07-02 14:37:09 +02:00
|
|
|
cat ${.ALLSRC} > ${.TARGET}
|
|
|
|
CLEANFILES+= ${file}.msg
|
2002-03-04 13:27:00 +01:00
|
|
|
.endif
|
2002-03-04 10:50:28 +01:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
#
|
|
|
|
# .cat file build rules
|
|
|
|
#
|
2002-07-02 14:37:09 +02:00
|
|
|
NLS:= ${NLS:=.cat}
|
|
|
|
CLEANFILES+= ${NLS}
|
|
|
|
FILESGROUPS?= FILES
|
|
|
|
FILESGROUPS+= NLS
|
|
|
|
NLSDIR?= ${SHAREDIR}/nls
|
2002-03-04 10:50:28 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# installation rules
|
|
|
|
#
|
2002-07-02 14:37:09 +02:00
|
|
|
.for file in ${NLS}
|
|
|
|
NLSNAME_${file:T}= ${file:T:R}/${NLSNAME}.cat
|
|
|
|
.if defined(NLSLINKS_${file:R}) && !empty(NLSLINKS_${file:R})
|
|
|
|
NLSLINKS+= ${file:R}
|
|
|
|
.endif
|
|
|
|
.for dst in ${NLSLINKS_${file:R}}
|
|
|
|
SYMLINKS+= ../${file:R}/${NLSNAME}.cat ${NLSDIR}/${dst}/${NLSNAME}.cat
|
2002-03-04 13:27:00 +01:00
|
|
|
.endfor
|
|
|
|
.endfor
|
2002-03-04 10:50:28 +01:00
|
|
|
|
2006-03-17 19:54:44 +01:00
|
|
|
.endif # defined(NLS) && !empty(NLS) && ${MK_NLS} != "no"
|