1 # $FreeBSD: src/share/mk/bsd.nls.mk,v 1.11 2005/02/27 16:36:54 phantom Exp $
2 # $DragonFly: src/share/mk/bsd.nls.mk,v 1.3 2005/04/21 16:36:35 joerg Exp $
4 # This include file <bsd.nls.mk> handles building and installing Native
5 # Language Support (NLS) catalogs
9 # GENCAT A program for converting .msg files into compiled NLS
10 # .cat files. [gencat]
12 # NLS Source or intermediate .msg files. [set in Makefile]
14 # NLSDIR Base path for National Language Support files
15 # installation. [${SHAREDIR}/nls]
17 # NLSGRP National Language Support files group. [${SHAREGRP}]
19 # NLSMODE National Language Support files mode. [${NOBINMODE}]
21 # NLSOWN National Language Support files owner. [${SHAREOWN}]
23 # NO_NLS Do not make or install NLS files. [not set]
25 .if
!target
(__
<bsd.init.mk
>__
)
26 .error bsd.nls.mk cannot be included directly.
34 ${GENCAT} ${.TARGET
} ${.IMPSRC
}
36 .if defined
(NLS
) && !empty
(NLS
) && !defined
(NO_NLS
)
39 # .msg file pre-build rules
41 NLSSRCDIR?
= ${.CURDIR
}
43 .if defined
(NLSSRCFILES
)
44 NLSSRCFILES_
${file}?
= ${NLSSRCFILES}
46 .if defined
(NLSSRCFILES_
${file})
47 NLSSRCDIR_
${file}?
= ${NLSSRCDIR}
48 ${file}.msg
: ${NLSSRCFILES_
${file}:S
/^
/${NLSSRCDIR_
${file}}\
//}
50 cat
${.ALLSRC
} > ${.TARGET
}
51 CLEANFILES
+= ${file}.msg
56 # .cat file build rules
67 NLSNAME_
${file
:T
}= ${file
:T
:R
}/${NLSNAME}.cat
68 .if defined
(NLSLINKS_
${file
:R
}) && !empty
(NLSLINKS_
${file
:R
})
71 .for dst in
${NLSLINKS_
${file
:R
}}
72 SYMLINKS
+= ..
/${file
:R
}/${NLSNAME}.cat
${NLSDIR}/${dst}/${NLSNAME}.cat
76 .
endif # defined(NLS) && !empty(NLS) && !defined(NO_NLS)