Makefile revision 1.19
1# $NetBSD: Makefile,v 1.19 2004/09/10 15:12:51 ian Exp $
2
3NOMAN=	# defined
4
5# pull LOCALEDIR and other declarations
6.include <bsd.own.mk>
7
8FILESOWN=	${LOCALEOWN}
9FILESGRP=	${LOCALEGRP}
10FILESMODE=	${LOCALEMODE}
11
12LOCALES += bg_BG.CP1251
13 LOCALESRC_bg_BG.CP1251 = bg_BG.CP1251
14
15LOCALES += ca_ES.ISO8859-1
16 LOCALESRC_ca_ES.ISO8859-1 = en_US.ISO_8859-1
17
18LOCALES += ca_ES.ISO8859-15
19 LOCALESRC_ca_ES.ISO8859-15 = en_US.DIS_8859-15
20
21LOCALES += cs_CZ.ISO8859-2
22 LOCALESRC_cs_CZ.ISO8859-2 = en_US.ISO_8859-2
23
24LOCALES += da_DK.ISO8859-1
25 LOCALESRC_da_DK.ISO8859-1 = en_US.ISO_8859-1
26
27LOCALES += da_DK.ISO8859-15
28 LOCALESRC_da_DK.ISO8859-15 = en_US.DIS_8859-15
29
30LOCALES += de_AT.ISO8859-1
31 LOCALESRC_de_AT.ISO8859-1 = en_US.ISO_8859-1
32
33LOCALES += de_AT.ISO8859-15
34 LOCALESRC_de_AT.ISO8859-15 = en_US.DIS_8859-15
35
36LOCALES += de_CH.ISO8859-1
37 LOCALESRC_de_CH.ISO8859-1 = en_US.ISO_8859-1
38
39LOCALES += de_CH.ISO8859-15
40 LOCALESRC_de_CH.ISO8859-15 = en_US.DIS_8859-15
41
42LOCALES += de_DE.ISO8859-1
43 LOCALESRC_de_DE.ISO8859-1 = en_US.ISO_8859-1
44
45LOCALES += de_DE.ISO8859-15
46 LOCALESRC_de_DE.ISO8859-15 = en_US.DIS_8859-15
47
48LOCALES += el_GR.ISO8859-7
49 LOCALESRC_el_GR.ISO8859-7 = el_GR.ISO8859-7
50
51LOCALES += en_AU.ISO8859-1
52 LOCALESRC_en_AU.ISO8859-1 = en_US.ISO_8859-1
53
54LOCALES += en_AU.ISO8859-15
55 LOCALESRC_en_AU.ISO8859-15 = en_US.DIS_8859-15
56
57LOCALES += en_CA.ISO8859-1
58 LOCALESRC_en_CA.ISO8859-1 = en_US.ISO_8859-1
59
60LOCALES += en_CA.ISO8859-15
61 LOCALESRC_en_CA.ISO8859-15 = en_US.DIS_8859-15
62
63LOCALES += en_GB.ISO8859-1
64 LOCALESRC_en_GB.ISO8859-1 = en_US.ISO_8859-1
65
66LOCALES += en_GB.ISO8859-15
67 LOCALESRC_en_GB.ISO8859-15 = en_US.DIS_8859-15
68
69LOCALES += en_US.ISO8859-1
70 LOCALESRC_en_US.ISO8859-1 = en_US.ISO_8859-1
71
72LOCALES += en_US.ISO8859-15
73 LOCALESRC_en_US.ISO8859-15 = en_US.DIS_8859-15
74
75LOCALES += en_US.UTF-8
76 LOCALESRC_en_US.UTF-8 = en_US.UTF-8
77
78LOCALES += es_ES.ISO8859-1
79 LOCALESRC_es_ES.ISO8859-1 = en_US.ISO_8859-1
80
81LOCALES += es_ES.ISO8859-15
82 LOCALESRC_es_ES.ISO8859-15 = en_US.DIS_8859-15
83
84LOCALES += fi_FI.ISO8859-1
85 LOCALESRC_fi_FI.ISO8859-1 = en_US.ISO_8859-1
86
87LOCALES += fi_FI.ISO8859-15
88 LOCALESRC_fi_FI.ISO8859-15 = en_US.DIS_8859-15
89
90LOCALES += fr_BE.ISO8859-1
91 LOCALESRC_fr_BE.ISO8859-1 = en_US.ISO_8859-1
92
93LOCALES += fr_BE.ISO8859-15
94 LOCALESRC_fr_BE.ISO8859-15 = en_US.DIS_8859-15
95
96LOCALES += fr_CA.ISO8859-1
97 LOCALESRC_fr_CA.ISO8859-1 = en_US.ISO_8859-1
98
99LOCALES += fr_CA.ISO8859-15
100 LOCALESRC_fr_CA.ISO8859-15 = en_US.DIS_8859-15
101
102LOCALES += fr_CH.ISO8859-1
103 LOCALESRC_fr_CH.ISO8859-1 = en_US.ISO_8859-1
104
105LOCALES += fr_CH.ISO8859-15
106 LOCALESRC_fr_CH.ISO8859-15 = en_US.DIS_8859-15
107
108LOCALES += fr_FR.ISO8859-1
109 LOCALESRC_fr_FR.ISO8859-1 = en_US.ISO_8859-1
110
111LOCALES += fr_FR.ISO8859-15
112 LOCALESRC_fr_FR.ISO8859-15 = en_US.DIS_8859-15
113
114LOCALES += hr_HR.ISO8859-2
115 LOCALESRC_hr_HR.ISO8859-2 = en_US.ISO_8859-2
116
117LOCALES += hu_HU.ISO8859-2
118 LOCALESRC_hu_HU.ISO8859-2 = en_US.ISO_8859-2
119
120LOCALES += hy_AM.ARMSCII-8
121 LOCALESRC_hy_AM.ARMSCII-8 = hy_AM.ARMSCII-8
122
123LOCALES += is_IS.ISO8859-1
124 LOCALESRC_is_IS.ISO8859-1 = en_US.ISO_8859-1
125
126LOCALES += is_IS.ISO8859-15
127 LOCALESRC_is_IS.ISO8859-15 = en_US.DIS_8859-15
128
129LOCALES += it_CH.ISO8859-1
130 LOCALESRC_it_CH.ISO8859-1 = en_US.ISO_8859-1
131
132LOCALES += it_CH.ISO8859-15
133 LOCALESRC_it_CH.ISO8859-15 = en_US.DIS_8859-15
134
135LOCALES += it_IT.ISO8859-1
136 LOCALESRC_it_IT.ISO8859-1 = en_US.ISO_8859-1
137
138LOCALES += it_IT.ISO8859-15
139 LOCALESRC_it_IT.ISO8859-15 = en_US.DIS_8859-15
140
141LOCALES += ja_JP.ct
142 LOCALESRC_ja_JP.ct = ja_JP.CTEXT
143
144LOCALES += ja_JP.eucJP
145 LOCALESRC_ja_JP.eucJP = ja_JP.eucJP
146
147LOCALES += ja_JP.ISO2022-JP
148 LOCALESRC_ja_JP.ISO2022-JP = ja_JP.ISO-2022-JP
149
150LOCALES += ja_JP.ISO2022-JP2
151 LOCALESRC_ja_JP.ISO2022-JP2 = ja_JP.ISO-2022-JP-2
152
153LOCALES += ja_JP.SJIS
154 LOCALESRC_ja_JP.SJIS = ja_JP.SJIS
155
156LOCALES += ko_KR.eucKR
157 LOCALESRC_ko_KR.eucKR = ko_KR.eucKR
158
159LOCALES += ko_KR.UTF-8
160 LOCALESRC_ko_KR.UTF-8 = en_US.UTF-8
161
162LOCALES += lt_LT.ISO8859-4
163 LOCALESRC_lt_LT.ISO8859-4 = en_US.ISO_8859-4
164
165LOCALES += lt_LT.ISO8859-13
166 LOCALESRC_lt_LT.ISO8859-13 = lt_LT.ISO8859-13
167
168LOCALES += nl_BE.ISO8859-1
169 LOCALESRC_nl_BE.ISO8859-1 = en_US.ISO_8859-1
170
171LOCALES += nl_BE.ISO8859-15
172 LOCALESRC_nl_BE.ISO8859-15 = en_US.DIS_8859-15
173
174LOCALES += nl_NL.ISO8859-1
175 LOCALESRC_nl_NL.ISO8859-1 = en_US.ISO_8859-1
176
177LOCALES += nl_NL.ISO8859-15
178 LOCALESRC_nl_NL.ISO8859-15 = en_US.DIS_8859-15
179
180LOCALES += no_NO.ISO8859-1
181 LOCALESRC_no_NO.ISO8859-1 = en_US.ISO_8859-1
182
183LOCALES += no_NO.ISO8859-15
184 LOCALESRC_no_NO.ISO8859-15 = en_US.DIS_8859-15
185
186LOCALES += pl_PL.ISO8859-2
187 LOCALESRC_pl_PL.ISO8859-2 = en_US.ISO_8859-2
188
189LOCALES += pt_PT.ISO8859-1
190 LOCALESRC_pt_PT.ISO8859-1 = en_US.ISO_8859-1
191
192LOCALES += pt_PT.ISO8859-15
193 LOCALESRC_pt_PT.ISO8859-15 = en_US.DIS_8859-15
194
195LOCALES += ru_RU.CP866
196 LOCALESRC_ru_RU.CP866 = ru_RU.CP866
197
198LOCALES += ru_RU.KOI8-R
199 LOCALESRC_ru_RU.KOI8-R = ru_RU.KOI8-R
200
201LOCALES += ru_RU.ISO8859-5
202 LOCALESRC_ru_RU.ISO8859-5 = ru_RU.ISO_8859-5
203
204LOCALES += sk_SK.ISO8859-2
205 LOCALESRC_sk_SK.ISO8859-2 = en_US.ISO_8859-2
206
207LOCALES += sl_SI.ISO8859-2
208 LOCALESRC_sl_SI.ISO8859-2 = en_US.ISO_8859-2
209
210LOCALES += sv_SE.ISO8859-1
211 LOCALESRC_sv_SE.ISO8859-1 = en_US.ISO_8859-1
212
213LOCALES += sv_SE.ISO8859-15
214 LOCALESRC_sv_SE.ISO8859-15 = en_US.DIS_8859-15
215
216LOCALES += uk_UA.KOI8-U
217 LOCALESRC_uk_UA.KOI8-U = uk_UA.KOI8-U
218
219LOCALES += zh_CN.eucCN
220 LOCALESRC_zh_CN.eucCN = zh_CN.eucCN
221
222LOCALES += zh_CN.GB18030
223 LOCALESRC_zh_CN.GB18030 = zh_CN.GB18030
224
225LOCALES += zh_TW.Big5
226 LOCALESRC_zh_TW.Big5 = zh_TW.BIG5
227
228# XXX: EUC-TW is not EUC!
229LOCALES += zh_TW.eucTW
230 LOCALESRC_zh_TW.eucTW = zh_TW.eucTW
231
232all: ${LOCALES:S/$/.out/g}
233realall: ${LOCALES:S/$/.out/g}
234
235.for locale in ${LOCALES}
236LOCALESRCS+=	${LOCALESRC_${locale}}
237.endfor
238CLEANFILES+=	${LOCALES:S/$/.out/g}
239
240# TODO: more use of symlinks?
241FILES=	${LOCALES:S/$/.out/g}
242.for locale in ${LOCALES}
243FILESDIR_${locale}.out=	${LOCALEDIR}/${locale}
244FILESNAME_${locale}.out=	LC_CTYPE
245.endfor
246
247# dependencies
248.for locale in ${LOCALES}
249${locale}.out: ${LOCALESRC_${locale}}.src \
250		${NETBSDSRCDIR}/lib/libc/locale/runetable.c
251	${_MKTARGET_CREATE}
252	${CPP} -I${.CURDIR} < ${.CURDIR}/${LOCALESRC_${locale}}.src | \
253	    sed -e '/^#/d' | ${TOOL_MKLOCALE} -o ${.TARGET}
254.endfor
255
256.SUFFIXES: .src .out
257.src.out:
258	${_MKTARGET_CREATE}
259	${CPP} -I${.CURDIR} < ${.IMPSRC} | sed -e '/^#/d' | \
260            ${TOOL_MKLOCALE} -o ${.TARGET}
261
262# does not work
263#depend:
264#	${MKDEP} -a ${MKDEPFLAGS} \
265#	    ${CPPFLAGS:M-[ID]*} ${CPPFLAGS} \
266#	    ${LOCALESRCS:S/$/.src/g:S/^/${.CURDIR}\//g}
267
268.include <bsd.prog.mk>
269