Makefile revision 1.20
1# $NetBSD: Makefile,v 1.20 2005/02/10 18:03:02 tnozaki 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 += lt_LT.ISO8859-4
160 LOCALESRC_lt_LT.ISO8859-4 = en_US.ISO_8859-4
161
162LOCALES += lt_LT.ISO8859-13
163 LOCALESRC_lt_LT.ISO8859-13 = lt_LT.ISO8859-13
164
165LOCALES += nl_BE.ISO8859-1
166 LOCALESRC_nl_BE.ISO8859-1 = en_US.ISO_8859-1
167
168LOCALES += nl_BE.ISO8859-15
169 LOCALESRC_nl_BE.ISO8859-15 = en_US.DIS_8859-15
170
171LOCALES += nl_NL.ISO8859-1
172 LOCALESRC_nl_NL.ISO8859-1 = en_US.ISO_8859-1
173
174LOCALES += nl_NL.ISO8859-15
175 LOCALESRC_nl_NL.ISO8859-15 = en_US.DIS_8859-15
176
177LOCALES += no_NO.ISO8859-1
178 LOCALESRC_no_NO.ISO8859-1 = en_US.ISO_8859-1
179
180LOCALES += no_NO.ISO8859-15
181 LOCALESRC_no_NO.ISO8859-15 = en_US.DIS_8859-15
182
183LOCALES += pl_PL.ISO8859-2
184 LOCALESRC_pl_PL.ISO8859-2 = en_US.ISO_8859-2
185
186LOCALES += pt_PT.ISO8859-1
187 LOCALESRC_pt_PT.ISO8859-1 = en_US.ISO_8859-1
188
189LOCALES += pt_PT.ISO8859-15
190 LOCALESRC_pt_PT.ISO8859-15 = en_US.DIS_8859-15
191
192LOCALES += ru_RU.CP866
193 LOCALESRC_ru_RU.CP866 = ru_RU.CP866
194
195LOCALES += ru_RU.KOI8-R
196 LOCALESRC_ru_RU.KOI8-R = ru_RU.KOI8-R
197
198LOCALES += ru_RU.ISO8859-5
199 LOCALESRC_ru_RU.ISO8859-5 = ru_RU.ISO_8859-5
200
201LOCALES += sk_SK.ISO8859-2
202 LOCALESRC_sk_SK.ISO8859-2 = en_US.ISO_8859-2
203
204LOCALES += sl_SI.ISO8859-2
205 LOCALESRC_sl_SI.ISO8859-2 = en_US.ISO_8859-2
206
207LOCALES += sv_SE.ISO8859-1
208 LOCALESRC_sv_SE.ISO8859-1 = en_US.ISO_8859-1
209
210LOCALES += sv_SE.ISO8859-15
211 LOCALESRC_sv_SE.ISO8859-15 = en_US.DIS_8859-15
212
213LOCALES += uk_UA.KOI8-U
214 LOCALESRC_uk_UA.KOI8-U = uk_UA.KOI8-U
215
216LOCALES += zh_CN.eucCN
217 LOCALESRC_zh_CN.eucCN = zh_CN.eucCN
218
219LOCALES += zh_CN.GB18030
220 LOCALESRC_zh_CN.GB18030 = zh_CN.GB18030
221
222LOCALES += zh_TW.Big5
223 LOCALESRC_zh_TW.Big5 = zh_TW.BIG5
224
225# XXX: EUC-TW is not EUC!
226LOCALES += zh_TW.eucTW
227 LOCALESRC_zh_TW.eucTW = zh_TW.eucTW
228
229all: ${LOCALES:S/$/.out/g}
230realall: ${LOCALES:S/$/.out/g}
231
232.for locale in ${LOCALES}
233LOCALESRCS+=	${LOCALESRC_${locale}}
234.endfor
235CLEANFILES+=	${LOCALES:S/$/.out/g}
236
237# TODO: more use of symlinks?
238FILES=	${LOCALES:S/$/.out/g}
239.for locale in ${LOCALES}
240FILESDIR_${locale}.out=	${LOCALEDIR}/${locale}
241FILESNAME_${locale}.out=	LC_CTYPE
242.endfor
243
244# dependencies
245.for locale in ${LOCALES}
246${locale}.out: ${LOCALESRC_${locale}}.src \
247		${NETBSDSRCDIR}/lib/libc/locale/runetable.c
248	${_MKTARGET_CREATE}
249	${CPP} -I${.CURDIR} < ${.CURDIR}/${LOCALESRC_${locale}}.src | \
250	    sed -e '/^#/d' | ${TOOL_MKLOCALE} -o ${.TARGET}
251.endfor
252
253.SUFFIXES: .src .out
254.src.out:
255	${_MKTARGET_CREATE}
256	${CPP} -I${.CURDIR} < ${.IMPSRC} | sed -e '/^#/d' | \
257            ${TOOL_MKLOCALE} -o ${.TARGET}
258
259# does not work
260#depend:
261#	${MKDEP} -a ${MKDEPFLAGS} \
262#	    ${CPPFLAGS:M-[ID]*} ${CPPFLAGS} \
263#	    ${LOCALESRCS:S/$/.src/g:S/^/${.CURDIR}\//g}
264
265.include <bsd.prog.mk>
266