1 # Makefile.am -- Makefile for the m17n database
2 # Copyright (C) 2003, 2004, 2005
3 # National Institute of Advanced Industrial Science and Technology (AIST)
4 # Registration Number H15PRO112
6 # This file is part of the m17n database; a sub-part of the m17n
9 # The m17n library is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU Lesser General Public License
11 # as published by the Free Software Foundation; either version 2.1 of
12 # the License, or (at your option) any later version.
14 # The m17n library is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # Lesser General Public License for more details.
19 # You should have received a copy of the GNU Lesser General Public
20 # License along with the m17n library; if not, write to the Free
21 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
27 ${FONT_LAYOUT_TABLE} \
33 ${FONT_LAYOUT_TABLE} \
38 mapconv compact.awk gb180302.awk gb180304.awk \
39 CHARTAB.awk NAME.awk LINEBREAK.awk \
40 CASED.awk CASE-MAPPING.awk \
44 CHARSETS = ${ISO8859} ${IBM} ${CODEPAGE} ${CJK} ${MISC}
47 8859-2.map 8859-3.map 8859-4.map 8859-5.map 8859-6.map 8859-7.map \
48 8859-8.map 8859-9.map 8859-10.map 8859-11.map 8859-13.map 8859-14.map \
49 8859-15.map 8859-16.map
52 IBM037.map IBM038.map \
53 IBM256.map IBM273.map IBM274.map IBM275.map IBM277.map IBM278.map \
54 IBM280.map IBM281.map IBM284.map IBM285.map IBM290.map IBM297.map \
55 IBM420.map IBM423.map IBM424.map IBM437.map IBM500.map IBM850.map \
56 IBM851.map IBM852.map IBM855.map IBM857.map IBM860.map IBM861.map \
57 IBM862.map IBM863.map IBM864.map IBM865.map IBM866.map IBM868.map \
58 IBM869.map IBM870.map IBM871.map IBM874.map IBM875.map IBM880.map \
59 IBM891.map IBM903.map IBM904.map IBM905.map IBM918.map \
60 IBM1004.map IBM1026.map IBM1047.map
63 CP737.map CP775.map CP949-2BYTE.map \
64 CP1250.map CP1251.map CP1252.map CP1253.map CP1254.map \
65 CP1255.map CP1256.map CP1257.map CP1258.map \
68 CJK = GB_1988-80.map GB2312.map GBK.map GB180302.map GB180304.map \
69 BIG5.map BIG5-HKSCS.map\
70 CNS-1.map CNS-2.map CNS-3.map CNS-4.map CNS-5.map CNS-6.map CNS-7.map \
72 JISX0201.map JISX0208.map JISX0212.map JISX2131.map JISX2132.map \
74 KSC5601.map KSC5636.map JOHAB.map
76 MISC = KOI-8.map KOI8-R.map KOI8-U.map KOI8-T.map \
77 TIS-620.map VISCII.map VSCII.map\
78 KA-PS.map KA-ACADEMY.map
81 NAME.tab SCRIPT.tab CASE-S.tab CASE-C.tab \
82 CATEGORY.tab COMBINE.tab BIDI.tab LINEBREAK.tab \
83 CASED.tab SOFT-DOTTED.tab CASE-MAPPING.tab
86 ARAB.flt ARAB-OTF.flt ARAB-OTF-NO-GPOS.flt \
88 DEVA-CDAC.flt DEVA-OTF.flt \
91 HEBR.flt HEBR-FF.flt \
92 KHMR-MULE.flt KHMR-ANLONG.flt KHMR-OTF.flt \
94 LAOO-MULE.flt LAOO-ALICE.flt LAOO-GENERIC.flt \
95 MLYM-CDAC.flt MLYM-OTF.flt MLYM-RACHANA.flt \
100 TAML-CDAC.flt TAML-OTF.flt \
103 THAI-TIS620.flt THAI-NORASI.flt THAI-GENERIC.flt \
104 TIBT-MULE.flt TIBT-MTIB.flt TIBT-OTF.flt \
122 ja-anthy.mim ja-tcode.mim \
124 kk-kbd.mim kk-arabic.mim \
127 ko-han2.mim ko-romaja.mim \
141 vi-viqr.mim vi-telex.mim vi-vni.mim \
142 zh-py.mim zh-py-gb.mim zh-py-b5.mim zh-pinyin.mim zh-tonepy.mim \
143 latn-post.mim latn-pre.mim \
146 unicode.mim rfc1345.mim cjk-util.mim \
150 LOCALE.cs LOCALE.ali \
151 default.fst xfont.fst truetype.fst generic.fst \
152 FONTENC.tbl FONTSIZE.tbl \
153 CHARSET.tbl CODING.tbl im-cmd.tbl \
154 LANGUAGE.tbl SCRIPT-OTF.tbl SCRIPT-LANGUAGE.tbl
158 UNIDATA/UnicodeData.txt UNIDATA/Scripts.txt UNIDATA/CaseFolding.txt \
159 UNIDATA/LineBreak.txt \
160 UNIDATA/PropList.txt UNIDATA/WordBreakProperty.txt \
161 UNIDATA/SpecialCasing.txt
165 FORMATS/0General.txt FORMATS/CharsetList.txt FORMATS/CodingList.txt \
166 FORMATS/Dir.txt FORMATS/FontEncoding.txt FORMATS/Fontset.txt \
167 FORMATS/FLT.txt FORMATS/FontSize.txt FORMATS/IM.txt
169 all: ${CHARSETS} ${CHAR_TABLE}
173 CHARMAPS = @CHARMAPS@
174 CHARMAP_EXT = @CHARMAP_EXT@
175 CHARMAP_CAT = @CHARMAP_CAT@
177 GB2312.map: ${CHARMAPS}/GB2312${CHARMAP_EXT} mapconv compact.awk
178 @echo "Generating $@..."
179 @sh mapconv $< '/^<.*[ ]\/x[a-f]/' 2 NOMSB compact > $@
181 GBK.map: ${CHARMAPS}/GBK${CHARMAP_EXT} mapconv compact.awk
182 @echo "Generating $@..."
183 @sh mapconv $< '/^<.*[ ]\/x[89a-f]/' 2 WITHMSB compact > $@
185 GB180302.map: ${CHARMAPS}/GB18030${CHARMAP_EXT} mapconv gb180302.awk
186 @echo "Generating $@..."
187 @sh mapconv $< '/^<.*[ ]\/x..\/x..[ ]/' 2 WITHMSB gb180302 > $@
189 GB180304.map: GB180302.map gb180304.awk
190 @echo "Generating $@..."
191 @$(AWK) -f gb180304.awk < $< > $@
193 JISX0201.map: ${CHARMAPS}/JIS_X0201${CHARMAP_EXT} mapconv compact.awk
194 @echo "Generating $@..."
195 @sh mapconv $< '/^<.*[ ]\/x[0-9]/' 1 WITHMSB compact > $@
196 @echo "# Generated by hand" >> $@
197 @echo "0x00A1-0x00DF 0xFF61" >> $@
199 JISX0208.map: ${CHARMAPS}/EUC-JP${CHARMAP_EXT} mapconv compact.awk
200 @echo "Generating $@..."
201 @sh mapconv $< '/^<.*[ ]\/x[a-f]/' 2 NOMSB compact \
202 | sed 's/0x2015/0x2014/' > $@> $@
204 JISX0212.map: ${CHARMAPS}/EUC-JP${CHARMAP_EXT} mapconv compact.awk
205 @echo "Generating $@..."
206 @sh mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' 2 NOMSB compact > $@
208 JISX2131.map: ${CHARMAPS}/EUC-JISX0213${CHARMAP_EXT} mapconv
209 @echo "Generating $@..."
210 @sh mapconv $< '/^<.*[ ]\/x[a-f]/' 2 NOMSB \
211 | sed 's/0x2015/0x2014/' > $@> $@
213 JISX2132.map: ${CHARMAPS}/EUC-JISX0213${CHARMAP_EXT} mapconv
214 @echo "Generating $@..."
215 @sh mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' 2 NOMSB > $@
218 @echo "Generating $@"
219 @(echo "0x2E21 0x4FF1"; \
220 echo "0x2F7E 0x525D"; \
221 echo "0x4F54 0x20B9F"; \
222 echo "0x4F7E 0x541E"; \
223 echo "0x7427 0x5653"; \
224 echo "0x7E7A 0x59F8"; \
225 echo "0x7E7B 0x5C5B"; \
226 echo "0x7E7C 0x5E77"; \
227 echo "0x7E7D 0x7626"; \
228 echo "0x7E7E 0x7E6B") > $@
230 KSC5601.map: ${CHARMAPS}/EUC-KR${CHARMAP_EXT} mapconv compact.awk
231 @echo "Generating $@..."
232 @sh mapconv $< '/^<.*[ ]\/x[a-f]/' 2 NOMSB compact > $@
234 BIG5.map: ${CHARMAPS}/BIG5${CHARMAP_EXT} mapconv compact.awk
235 @echo "Generating $@..."
236 @sh mapconv $< '/^<.*[ ]\/x[a-f]/' 2 WITHMSB compact > $@
238 BIG5-HKSCS.map: ${CHARMAPS}/BIG5-HKSCS${CHARMAP_EXT} mapconv compact.awk
239 @echo "Generating $@..."
240 @sh mapconv $< '/^<.*[ ]\/x[89a-f].\//' 2 WITHMSB compact > $@
242 JOHAB.map: ${CHARMAPS}/JOHAB${CHARMAP_EXT} mapconv compact.awk
243 @echo "Generating $@..."
244 @sh mapconv $< '/^<.*[ ]\/x[89a-f]/' 2 WITHMSB compact > $@
246 CNS-1.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
247 @echo "Generating $@..."
248 @sh mapconv $< '/^<.*[ ]\/x[a-f]/' 2 NOMSB compact > $@
250 CNS-2.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
251 @echo "Generating $@..."
252 @sh mapconv $< '/^<.*\/x8e\/xa2/ s,/x8e/xa2,,' 2 NOMSB compact > $@
254 CNS-3.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
255 @echo "Generating $@..."
256 @sh mapconv $< '/^<.*\/x8e\/xa3/ s,/x8e/xa3,,' 2 NOMSB compact > $@
258 CNS-4.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
259 @echo "Generating $@..."
260 @sh mapconv $< '/^<.*\/x8e\/xa4/ s,/x8e/xa4,,' 2 NOMSB compact > $@
262 CNS-5.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
263 @echo "Generating $@..."
264 @sh mapconv $< '/^<.*\/x8e\/xa5/ s,/x8e/xa5,,' 2 NOMSB compact > $@
266 CNS-6.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
267 @echo "Generating $@..."
268 @sh mapconv $< '/^<.*\/x8e\/xa6/ s,/x8e/xa6,,' 2 NOMSB compact > $@
270 CNS-7.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
271 @echo "Generating $@..."
272 @sh mapconv $< '/^<.*\/x8e\/xa7/ s,/x8e/xa7,,' 2 NOMSB compact > $@
274 CNS-F.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
275 @echo "Generating $@..."
276 @sh mapconv $< '/^<.*\/x8e\/xaf/ s,/x8e/xaf,,' 2 NOMSB compact > $@
278 CP949-2BYTE.map: ${CHARMAPS}/CP949${CHARMAP_EXT} mapconv compact.awk
279 @echo "Generating $@..."
280 @sh mapconv $< '/^<.*[ ]\/x[89a-f]/' 2 WITHMSB compact > $@
282 VSCII.map: ${CHARMAPS}/TCVN5712-1${CHARMAP_EXT} mapconv compact.awk
283 @echo "Generating $@..."
284 @sh mapconv $< '/^<.*[ ]\/x[0-9a-f]. /' 1 WITHMSB compact > $@
286 # General target to produce map files for single-byte charsets.
288 8859-%.map: ${CHARMAPS}/ISO-8859-%${CHARMAP_EXT} mapconv compact.awk
289 @echo "Generating $@..."
290 @sh mapconv $< '/^<.*[ ]\/x/' 1 WITHMSB compact > $@
292 KA-%.map: ${CHARMAPS}/GEORGIAN-%${CHARMAP_EXT} mapconv compact.awk
293 @echo "Generating $@..."
294 @sh mapconv $< '/^<.*[ ]\/x/' 1 WITHMSB compact > $@
296 %.map: ${CHARMAPS}/%${CHARMAP_EXT} mapconv compact.awk
297 @echo "Generating $@..."
298 @sh mapconv $< '/^<.*[ ]\/x/' 1 WITHMSB compact > $@
300 # Rules for chartables
302 CASE-S.tab: UNIDATA/CaseFolding.txt Makefile
303 echo "# Generated from $<." > $@
304 @$(AWK) '/^[0-9A-Z]/ { \
305 if ($$2 == "F") print "0x"$$1,"0xFFFF"; \
306 else print "0x"$$1,"0x"$$3; }' FS="[; ][; ]*" $< >> $@
308 CASE-C.tab: UNIDATA/CaseFolding.txt Makefile
309 echo "# Generated from $<." > $@
310 @$(AWK) '/^[0-9A-Z]*; F/ { \
312 for (i = 3; $$i != "#"; i++) \
314 print "\n"; }' FS="[; ][; ]*" ORS="" $< >> $@
316 NAME.tab: UNIDATA/UnicodeData.txt NAME.awk
317 echo "# Generated from $<." > $@
318 @$(AWK) -f NAME.awk $< >> $@
320 SCRIPT.tab: UNIDATA/Scripts.txt Makefile
321 echo "# Generated from $<." > $@
322 @echo "0x0-0x3FFFFF common" >> $@
323 @sed '/; Common / d' $< | \
324 $(AWK) '/^[0-9A-F]/ { print "0x"$$1, $$3; }' | \
325 sed -e 's/\.\./-0x/' | \
326 tr '[:upper:]' '[:lower:]' >> $@
328 CASED.tab: UNIDATA/UnicodeData.txt UNIDATA/PropList.txt UNIDATA/WordBreakProperty.txt CASED.awk
329 echo "# Generated from UNIDATA/UnicodeData.txt, UNIDATA/PropList.txt, and UNIDATA/WordBreakProperty.txt." > $@
330 @$(AWK) -f CASED.awk UNIDATA/UnicodeData.txt UNIDATA/PropList.txt UNIDATA/WordBreakProperty.txt >> $@
332 SOFT-DOTTED.tab: UNIDATA/PropList.txt Makefile
333 echo "# Generated from $<." > $@
334 @$(AWK) '/^[^#;]+; *Soft_Dotted/ { \
335 if (index ($$1, ".")) { \
336 split ($$1, A, "\\.\\."); \
337 print "0x"A[1]"-0x"A[2]" t"; } \
338 else print "0x"$$1" t"; }' \
341 CASE-MAPPING.tab: UNIDATA/SpecialCasing.txt UNIDATA/UnicodeData.txt CASE-MAPPING.awk
342 echo "# Generated from UNIDATA/SpecialCasing.txt and UNIDATA/UnicodeData.txt." > $@
343 @$(AWK) -f CASE-MAPPING.awk UNIDATA/SpecialCasing.txt UNIDATA/UnicodeData.txt >> $@
345 LINEBREAK.tab: UNIDATA/LineBreak.txt LINEBREAK.awk
346 echo "# Generated from $<." > $@
347 @$(AWK) -f LINEBREAK.awk $< >> $@
349 %.tab: UNIDATA/UnicodeData.txt CHARTAB.awk
350 echo "# Generated from $<." > $@
351 @$(AWK) -f CHARTAB.awk FIELD=$@ $< >>$@
353 pkgdatadir=$(datadir)/m17n
355 bin_SCRIPTS = m17n-db
357 # Clear files that are automatically generated.
359 rm -f ${CHARSETS} ${CHAR_TABLE}