turns printfs back on
[freebsd-src/fkvm-freebsd.git] / share / mk / bsd.nls.mk
blob48093ebf083823b90a11d53537954ca2feec3633
1 # $FreeBSD$
3 # This include file <bsd.nls.mk> handles building and installing Native
4 # Language Support (NLS) catalogs
6 # +++ variables +++
8 # GENCAT A program for converting .msg files into compiled NLS
9 # .cat files. [gencat]
11 # NLS Source or intermediate .msg files. [set in Makefile]
13 # NLSDIR Base path for National Language Support files
14 # installation. [${SHAREDIR}/nls]
16 # NLSGRP National Language Support files group. [${SHAREGRP}]
18 # NLSMODE National Language Support files mode. [${NOBINMODE}]
20 # NLSOWN National Language Support files owner. [${SHAREOWN}]
22 .if !target(__<bsd.init.mk>__)
23 .error bsd.nls.mk cannot be included directly.
24 .endif
26 GENCAT?= gencat
28 .SUFFIXES: .cat .msg
30 .msg.cat:
31 ${GENCAT} ${.TARGET} ${.IMPSRC}
33 .if defined(NLS) && !empty(NLS) && ${MK_NLS} != "no"
36 # .msg file pre-build rules
38 NLSSRCDIR?= ${.CURDIR}
39 .for file in ${NLS}
40 .if defined(NLSSRCFILES)
41 NLSSRCFILES_${file}?= ${NLSSRCFILES}
42 .endif
43 .if defined(NLSSRCFILES_${file})
44 NLSSRCDIR_${file}?= ${NLSSRCDIR}
45 ${file}.msg: ${NLSSRCFILES_${file}:S/^/${NLSSRCDIR_${file}}\//}
46 @rm -f ${.TARGET}
47 cat ${.ALLSRC} > ${.TARGET}
48 CLEANFILES+= ${file}.msg
49 .endif
50 .endfor
53 # .cat file build rules
55 NLS:= ${NLS:=.cat}
56 CLEANFILES+= ${NLS}
57 FILESGROUPS?= FILES
58 FILESGROUPS+= NLS
59 NLSDIR?= ${SHAREDIR}/nls
62 # installation rules
64 .for file in ${NLS}
65 NLSNAME_${file:T}= ${file:T:R}/${NLSNAME}.cat
66 .if defined(NLSLINKS_${file:R}) && !empty(NLSLINKS_${file:R})
67 NLSLINKS+= ${file:R}
68 .endif
69 .for dst in ${NLSLINKS_${file:R}}
70 SYMLINKS+= ../${file:R}/${NLSNAME}.cat ${NLSDIR}/${dst}/${NLSNAME}.cat
71 .endfor
72 .endfor
74 .endif # defined(NLS) && !empty(NLS) && ${MK_NLS} != "no"