1 # Makefile.am -- Makefile for the m17n database
2 # Copyright (C) 2003, 2004, 2005, 2006, 2007
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., 51 Franklin Street, Fifth Floor,
22 # Boston, MA 02110-1301, USA.
24 SUBDIRS = po icons FLT MIM LANGDATA
33 EXTRA_DIST = config.rpath mkinstalldirs m4/ChangeLog bootstrap.sh \
38 mapconv compact.awk gb180302.awk gb180304.awk \
39 CHARTAB.awk NAME.awk LINEBREAK.awk \
40 CASED.awk CASE-MAPPING.awk \
41 SCRIPT.awk SCRIPT.ext \
45 CHARSETS = ${ISO8859} ${IBM} ${CODEPAGE} ${CJK} ${MISC}
48 8859-2.map 8859-3.map 8859-4.map 8859-5.map 8859-6.map 8859-7.map \
49 8859-8.map 8859-9.map 8859-10.map 8859-11.map 8859-13.map 8859-14.map \
50 8859-15.map 8859-16.map
53 IBM037.map IBM038.map \
54 IBM256.map IBM273.map IBM274.map IBM275.map IBM277.map IBM278.map \
55 IBM280.map IBM281.map IBM284.map IBM285.map IBM290.map IBM297.map \
56 IBM420.map IBM423.map IBM424.map IBM437.map IBM500.map IBM850.map \
57 IBM851.map IBM852.map IBM855.map IBM857.map IBM860.map IBM861.map \
58 IBM862.map IBM863.map IBM864.map IBM865.map IBM866.map IBM868.map \
59 IBM869.map IBM870.map IBM871.map IBM874.map IBM875.map IBM880.map \
60 IBM891.map IBM903.map IBM904.map IBM905.map IBM918.map \
61 IBM1004.map IBM1026.map IBM1047.map
64 CP737.map CP775.map CP949-2BYTE.map \
65 CP1250.map CP1251.map CP1252.map CP1253.map CP1254.map \
66 CP1255.map CP1256.map CP1257.map CP1258.map \
69 CJK = GB_1988-80.map GB2312.map GBK.map GB180302.map GB180304.map \
70 BIG5.map BIG5-HKSCS.map\
71 CNS-1.map CNS-2.map CNS-3.map CNS-4.map CNS-5.map CNS-6.map CNS-7.map \
73 JISX0201.map JISX0208.map JISX0212.map JISX2131.map JISX2132.map \
75 KSC5601.map KSC5636.map JOHAB.map
77 MISC = KOI-8.map KOI8-R.map KOI8-U.map KOI8-T.map \
78 TIS-620.map VISCII.map VSCII.map\
79 KA-PS.map KA-ACADEMY.map
82 NAME.tab SCRIPT.tab CASE-S.tab CASE-C.tab \
83 CATEGORY.tab COMBINE.tab BIDI.tab LINEBREAK.tab \
84 CASED.tab SOFT-DOTTED.tab CASE-MAPPING.tab
87 LOCALE.cs LOCALE.ali \
88 default.fst xfont.fst truetype.fst generic.fst \
89 FONTENC.tbl FONTSIZE.tbl \
90 CHARSET.tbl CODING.tbl \
91 SCRIPT.tbl SCRIPT-OTF.tbl SCRIPT-LANGUAGE.tbl
95 UNIDATA/UnicodeData.txt UNIDATA/Scripts.txt UNIDATA/CaseFolding.txt \
96 UNIDATA/LineBreak.txt \
97 UNIDATA/PropList.txt UNIDATA/WordBreakProperty.txt \
98 UNIDATA/SpecialCasing.txt
102 FORMATS/0General.txt FORMATS/CharsetList.txt FORMATS/CodingList.txt \
103 FORMATS/Dir.txt FORMATS/FontEncoding.txt FORMATS/Fontset.txt \
104 FORMATS/FLT.txt FORMATS/FontSize.txt FORMATS/IM.txt
108 CHARMAPS = @CHARMAPS@
109 CHARMAP_EXT = @CHARMAP_EXT@
110 CHARMAP_CAT = @CHARMAP_CAT@
112 GB2312.map: ${CHARMAPS}/GB2312${CHARMAP_EXT} mapconv compact.awk
113 @echo "Generating $@..."
114 @sh mapconv $< '/^<.*[ ]\/x[a-f]/' 2 NOMSB compact > $@
116 GBK.map: ${CHARMAPS}/GBK${CHARMAP_EXT} mapconv compact.awk
117 @echo "Generating $@..."
118 @sh mapconv $< '/^<.*[ ]\/x[89a-f]/' 2 WITHMSB compact > $@
120 GB180302.map: ${CHARMAPS}/GB18030${CHARMAP_EXT} mapconv gb180302.awk
121 @echo "Generating $@..."
122 @sh mapconv $< '/^<.*[ ]\/x..\/x..[ ]/' 2 WITHMSB gb180302 > $@
124 GB180304.map: GB180302.map gb180304.awk
125 @echo "Generating $@..."
126 @$(AWK) -f gb180304.awk < $< > $@
128 JISX0201.map: ${CHARMAPS}/JIS_X0201${CHARMAP_EXT} mapconv compact.awk
129 @echo "Generating $@..."
130 @sh mapconv $< '/^<.*[ ]\/x[0-9]/' 1 WITHMSB compact > $@
131 @echo "# Generated by hand" >> $@
132 @echo "0x00A1-0x00DF 0xFF61" >> $@
134 JISX0208.map: ${CHARMAPS}/EUC-JP${CHARMAP_EXT} mapconv compact.awk
135 @echo "Generating $@..."
136 @sh mapconv $< '/^<.*[ ]\/x[a-f]/' 2 NOMSB compact \
137 | sed 's/0x2015/0x2014/' > $@> $@
139 JISX0212.map: ${CHARMAPS}/EUC-JP${CHARMAP_EXT} mapconv compact.awk
140 @echo "Generating $@..."
141 @sh mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' 2 NOMSB compact > $@
143 JISX2131.map: ${CHARMAPS}/EUC-JISX0213${CHARMAP_EXT} mapconv
144 @echo "Generating $@..."
145 @sh mapconv $< '/^<.*[ ]\/x[a-f]/' 2 NOMSB \
146 | sed 's/0x2015/0x2014/' > $@> $@
148 JISX2132.map: ${CHARMAPS}/EUC-JISX0213${CHARMAP_EXT} mapconv
149 @echo "Generating $@..."
150 @sh mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' 2 NOMSB > $@
153 @echo "Generating $@"
154 @(echo "0x2E21 0x4FF1"; \
155 echo "0x2F7E 0x525D"; \
156 echo "0x4F54 0x20B9F"; \
157 echo "0x4F7E 0x541E"; \
158 echo "0x7427 0x5653"; \
159 echo "0x7E7A 0x59F8"; \
160 echo "0x7E7B 0x5C5B"; \
161 echo "0x7E7C 0x5E77"; \
162 echo "0x7E7D 0x7626"; \
163 echo "0x7E7E 0x7E6B") > $@
165 KSC5601.map: ${CHARMAPS}/EUC-KR${CHARMAP_EXT} mapconv compact.awk
166 @echo "Generating $@..."
167 @sh mapconv $< '/^<.*[ ]\/x[a-f]/' 2 NOMSB compact > $@
169 BIG5.map: ${CHARMAPS}/BIG5${CHARMAP_EXT} mapconv compact.awk
170 @echo "Generating $@..."
171 @sh mapconv $< '/^<.*[ ]\/x[a-f]/' 2 WITHMSB compact > $@
173 BIG5-HKSCS.map: ${CHARMAPS}/BIG5-HKSCS${CHARMAP_EXT} mapconv compact.awk
174 @echo "Generating $@..."
175 @sh mapconv $< '/^<.*[ ]\/x[89a-f].\//' 2 WITHMSB compact > $@
177 JOHAB.map: ${CHARMAPS}/JOHAB${CHARMAP_EXT} mapconv compact.awk
178 @echo "Generating $@..."
179 @sh mapconv $< '/^<.*[ ]\/x[89a-f]/' 2 WITHMSB compact > $@
181 CNS-1.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
182 @echo "Generating $@..."
183 @sh mapconv $< '/^<.*[ ]\/x[a-f]/' 2 NOMSB compact > $@
185 CNS-2.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
186 @echo "Generating $@..."
187 @sh mapconv $< '/^<.*\/x8e\/xa2/ s,/x8e/xa2,,' 2 NOMSB compact > $@
189 CNS-3.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
190 @echo "Generating $@..."
191 @sh mapconv $< '/^<.*\/x8e\/xa3/ s,/x8e/xa3,,' 2 NOMSB compact > $@
193 CNS-4.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
194 @echo "Generating $@..."
195 @sh mapconv $< '/^<.*\/x8e\/xa4/ s,/x8e/xa4,,' 2 NOMSB compact > $@
197 CNS-5.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
198 @echo "Generating $@..."
199 @sh mapconv $< '/^<.*\/x8e\/xa5/ s,/x8e/xa5,,' 2 NOMSB compact > $@
201 CNS-6.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
202 @echo "Generating $@..."
203 @sh mapconv $< '/^<.*\/x8e\/xa6/ s,/x8e/xa6,,' 2 NOMSB compact > $@
205 CNS-7.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
206 @echo "Generating $@..."
207 @sh mapconv $< '/^<.*\/x8e\/xa7/ s,/x8e/xa7,,' 2 NOMSB compact > $@
209 CNS-F.map: ${CHARMAPS}/EUC-TW${CHARMAP_EXT} mapconv compact.awk
210 @echo "Generating $@..."
211 @sh mapconv $< '/^<.*\/x8e\/xaf/ s,/x8e/xaf,,' 2 NOMSB compact > $@
213 CP949-2BYTE.map: ${CHARMAPS}/CP949${CHARMAP_EXT} mapconv compact.awk
214 @echo "Generating $@..."
215 @sh mapconv $< '/^<.*[ ]\/x[89a-f]/' 2 WITHMSB compact > $@
217 VSCII.map: ${CHARMAPS}/TCVN5712-1${CHARMAP_EXT} mapconv compact.awk
218 @echo "Generating $@..."
219 @sh mapconv $< '/^<.*[ ]\/x[0-9a-f]. /' 1 WITHMSB compact > $@
221 # General target to produce map files for single-byte charsets.
223 8859-%.map: ${CHARMAPS}/ISO-8859-%${CHARMAP_EXT} mapconv compact.awk
224 @echo "Generating $@..."
225 @sh mapconv $< '/^<.*[ ]\/x/' 1 WITHMSB compact > $@
227 KA-%.map: ${CHARMAPS}/GEORGIAN-%${CHARMAP_EXT} mapconv compact.awk
228 @echo "Generating $@..."
229 @sh mapconv $< '/^<.*[ ]\/x/' 1 WITHMSB compact > $@
231 %.map: ${CHARMAPS}/%${CHARMAP_EXT} mapconv compact.awk
232 @echo "Generating $@..."
233 @sh mapconv $< '/^<.*[ ]\/x/' 1 WITHMSB compact > $@
235 # Rules for chartables
237 CASE-S.tab: UNIDATA/CaseFolding.txt Makefile
238 echo "# Generated from $<." > $@
239 @$(AWK) '/^[0-9A-Z]/ { \
240 if ($$2 == "F") print "0x"$$1,"0xFFFF"; \
241 else print "0x"$$1,"0x"$$3; }' FS="[; ][; ]*" $< >> $@
243 CASE-C.tab: UNIDATA/CaseFolding.txt Makefile
244 echo "# Generated from $<." > $@
245 @$(AWK) '/^[0-9A-Z]*; F/ { \
247 for (i = 3; $$i != "#"; i++) \
248 printf "\\x%s",$$i; \
249 print "\n"; }' FS="[; ][; ]*" ORS="" $< >> $@
251 NAME.tab: UNIDATA/UnicodeData.txt NAME.awk
252 echo "# Generated from $<." > $@
253 @$(AWK) -f NAME.awk $< >> $@
255 SCRIPT.tab: UNIDATA/Scripts.txt UNIDATA/UnicodeData.txt SCRIPT.awk SCRIPT.ext
256 echo "# Generated from $<." > $@
257 @$(AWK) -f SCRIPT.awk UNIDATA/Scripts.txt >> $@
259 CASED.tab: UNIDATA/UnicodeData.txt UNIDATA/PropList.txt UNIDATA/WordBreakProperty.txt CASED.awk
260 echo "# Generated from UNIDATA/UnicodeData.txt, UNIDATA/PropList.txt, and UNIDATA/WordBreakProperty.txt." > $@
261 @$(AWK) -f CASED.awk UNIDATA/UnicodeData.txt UNIDATA/PropList.txt UNIDATA/WordBreakProperty.txt >> $@
263 SOFT-DOTTED.tab: UNIDATA/PropList.txt Makefile
264 echo "# Generated from $<." > $@
265 @$(AWK) '/^[^#;]+; *Soft_Dotted/ { \
266 if (index ($$1, ".")) { \
267 split ($$1, A, "\\.\\."); \
268 print "0x"A[1]"-0x"A[2]" t"; } \
269 else print "0x"$$1" t"; }' \
272 CASE-MAPPING.tab: UNIDATA/SpecialCasing.txt UNIDATA/UnicodeData.txt CASE-MAPPING.awk
273 echo "# Generated from UNIDATA/SpecialCasing.txt and UNIDATA/UnicodeData.txt." > $@
274 @$(AWK) -f CASE-MAPPING.awk UNIDATA/SpecialCasing.txt UNIDATA/UnicodeData.txt >> $@
276 LINEBREAK.tab: UNIDATA/LineBreak.txt LINEBREAK.awk
277 echo "# Generated from $<." > $@
278 @$(AWK) -f LINEBREAK.awk $< >> $@
280 %.tab: UNIDATA/UnicodeData.txt CHARTAB.awk
281 echo "# Generated from $<." > $@
282 @$(AWK) -f CHARTAB.awk FIELD=$@ $< >>$@
284 pkgdatadir=$(datadir)/m17n
286 bin_SCRIPTS = m17n-db
288 pkgconfigdir = ${datadir}/pkgconfig
290 pkgconfig_DATA = m17n-db.pc
292 # Clear files that are automatically generated.
294 rm -f ${CHARSETS} ${CHAR_TABLE}
296 ACLOCAL_AMFLAGS = -I m4