Mercurial > emacs
annotate admin/charsets/Makefile @ 89776:40c42a9165c2
Convert 0x2299 to 0x29BF.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 28 Jan 2004 11:00:38 +0000 |
parents | 7066b252cbed |
children | 55516d80d735 |
rev | line source |
---|---|
88123 | 1 # Makefile -- Makefile to generate charset maps in etc/charsets. |
2 # Copyright (C) 2003 | |
3 # National Institute of Advanced Industrial Science and Technology (AIST) | |
4 # Registration Number H13PRO009 | |
5 # | |
6 # This file is part of GNU Emacs. | |
7 | |
8 # GNU Emacs is free software; you can redistribute it and/or modify | |
9 # it under the terms of the GNU General Public License as published by | |
10 # the Free Software Foundation; either version 2, or (at your option) | |
11 # any later version. | |
12 | |
13 # GNU Emacs is distributed in the hope that it will be useful, | |
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 # GNU General Public License for more details. | |
17 | |
18 # You should have received a copy of the GNU General Public License | |
19 # along with GNU Emacs; see the file COPYING. If not, write to the | |
20 # Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
21 # Boston, MA 02111-1307, USA. | |
22 | |
23 # Commentary | |
24 | |
25 # At first, set these environment variables: | |
26 # GLIBC_CHARMAPS | |
27 # Directory of glibc-VERSION/localedate/charmaps. | |
28 # VERSION must be 2.3 or the later. | |
29 # MISC_CHARMAPS | |
30 # Direcory containing these charmap files: | |
31 # o bulgarian-mik.txt.gz | |
32 # provided at <http://czyborra.com/charsets/> | |
33 # o PTCP154 | |
34 # provided at <http://www.iana.org/assignments/charset-reg/> | |
35 # o stdenc.txt and symbol.txt | |
36 # provided at <http://www.unicode.org/Public/MAPPINGS/> | |
89738
d00dd977bedf
(CJK): Include CP932-2BYTE.map
Kenichi Handa <handa@m17n.org>
parents:
88123
diff
changeset
|
37 # o cp932.txt |
d00dd977bedf
(CJK): Include CP932-2BYTE.map
Kenichi Handa <handa@m17n.org>
parents:
88123
diff
changeset
|
38 # provided at <http://www.unicode.org/Public/MAPPINGS/VENDERS> |
88123 | 39 # o Uni2JIS |
40 # provided at <http://kanji.zinbun.kyoto-u.ac.jp/~yasuoka/CJK.html> | |
41 # o 720.htm and 858.htm | |
42 # provided at <http://www.microsoft.com/globaldev/reference/oem/> | |
89751 | 43 # o eucJP-13th.txt, eucJP-udc.txt, eucJP-ibmext.txt |
44 # provided at <http://www.opengroup.or.jp/jvc/cde/> | |
88123 | 45 # OLDEMACS |
46 # emacs of version 21.3.50 or later | |
47 # | |
48 # Then, do this: | |
49 # % make install | |
50 | |
51 CHARSETS = ${ISO8859} ${IBM} ${CODEPAGE} ${CJK} ${MISC} ${MULE} | |
52 | |
53 # Note: We can not prepend "ISO-" to these map files because of file | |
54 # name limits on DOS. | |
55 ISO8859 = \ | |
56 8859-2.map 8859-3.map 8859-4.map 8859-5.map 8859-6.map 8859-7.map \ | |
57 8859-8.map 8859-9.map 8859-10.map 8859-11.map 8859-13.map 8859-14.map \ | |
58 8859-15.map 8859-16.map | |
59 | |
60 IBM = \ | |
61 IBM037.map IBM038.map \ | |
62 IBM256.map IBM273.map IBM274.map IBM275.map IBM277.map IBM278.map \ | |
63 IBM280.map IBM281.map IBM284.map IBM285.map IBM290.map IBM297.map \ | |
64 IBM420.map IBM423.map IBM424.map IBM437.map IBM500.map IBM850.map \ | |
65 IBM851.map IBM852.map IBM855.map IBM856.map IBM857.map IBM860.map \ | |
66 IBM861.map IBM862.map IBM863.map IBM864.map IBM865.map IBM866.map \ | |
67 IBM868.map IBM869.map IBM870.map IBM871.map IBM874.map IBM875.map \ | |
68 IBM880.map IBM891.map IBM903.map IBM904.map IBM905.map IBM918.map \ | |
69 IBM1004.map IBM1026.map IBM1047.map | |
70 | |
71 CODEPAGE = \ | |
72 CP737.map CP775.map CP1125.map\ | |
73 CP1250.map CP1251.map CP1252.map CP1253.map CP1254.map \ | |
74 CP1255.map CP1256.map CP1257.map CP1258.map \ | |
75 CP10007.map \ | |
76 CP720.map CP858.map | |
77 | |
78 CJK = GB2312.map GBK.map GB180302.map GB180304.map \ | |
79 BIG5.map BIG5-HKSCS.map\ | |
80 CNS-1.map CNS-2.map CNS-3.map CNS-4.map CNS-5.map CNS-6.map CNS-7.map \ | |
81 CNS-F.map \ | |
82 JISX0201.map JISX0208.map JISX0212.map JISX2131.map JISX2132.map \ | |
89769
95fd0085db37
(CJK): Include JISX213A.map.
Kenichi Handa <handa@m17n.org>
parents:
89751
diff
changeset
|
83 JISC6226.map CP932-2BYTE.map JISX213A.map\ |
88123 | 84 KSC5601.map KSC5636.map JOHAB.map |
85 | |
86 MISC = KOI-8.map KOI8-R.map KOI8-U.map KOI8-T.map ALTERNATIVNYJ.map \ | |
87 MIK.map PTCP154.map \ | |
88 TIS-620.map VISCII.map VSCII.map VSCII-2.map\ | |
89 KA-PS.map KA-ACADEMY.map \ | |
90 HP-ROMAN8.map NEXTSTEP.map MACINTOSH.map EBCDICUK.map EBCDICUS.map \ | |
91 stdenc.map symbol.map \ | |
92 CP949-2BYTE.map \ | |
93 BIG5-1.map BIG5-2.map | |
94 | |
95 # Emacs-mule charsets. | |
96 MULE = MULE-ethiopic.map MULE-ipa.map MULE-is13194.map \ | |
97 MULE-sisheng.map MULE-tibetan.map \ | |
98 MULE-lviscii.map MULE-uviscii.map | |
99 | |
89751 | 100 TRANS_TABLE = cp51932.el eucjp-ms.el |
101 | |
88123 | 102 charsets: ${CHARSETS} |
103 | |
104 AWK = gawk | |
105 | |
106 # Rules for each charset | |
107 | |
108 VSCII.map: ${GLIBC_CHARMAPS}/TCVN5712-1 mapconv compact.awk | |
109 # Generating $@... | |
110 @mapconv $< '/^<.*[ ]\/x[0-9a-f].[ ]/' GLIBC-1 compact.awk > $@ | |
111 | |
112 VSCII-2.map: ${GLIBC_CHARMAPS}/TCVN5712-1 mapconv compact.awk | |
113 # Generating $@... | |
114 @mapconv $< '/^<.*[ ]\/x[2-7a-f].[ ]/' GLIBC-1 compact.awk \ | |
115 | sed 's/0x20-0x7F.*/0x00-0x7F 0x0000/' > $@ | |
116 | |
117 ALTERNATIVNYJ.map: IBM866.map | |
118 # Generating $@... | |
119 @echo "# Modified from ibm866 according to the chart at" > $@ | |
120 @echo "# http://www.cyrillic.com/ref/cyrillic/koi-8alt.html," >> $@ | |
121 @echo "# with guesses for the Unicodes of the glyphs." >> $@ | |
122 @sed -e '/0xF2/ s/ .*/ 0x2019/' \ | |
123 -e '/0xF3/ s/ .*/ 0x2018/' \ | |
124 -e '/0xF4/ s/ .*/ 0x0301/' \ | |
125 -e '/0xF5/ s/ .*/ 0x0300/' \ | |
126 -e '/0xF6/ s/ .*/ 0x203A/' \ | |
127 -e '/0xF7/ s/ .*/ 0x2039/' \ | |
128 -e '/0xF8/ s/ .*/ 0x2191/' \ | |
129 -e '/0xF9/ s/ .*/ 0x2193/' \ | |
130 -e '/0xFA/ s/ .*/ 0x00B1/' \ | |
131 -e '/0xFB/ s/ .*/ 0x00F7/' < $< >> $@ | |
132 | |
133 MIK.map: ${MISC_CHARMAPS}/bulgarian-mik.txt.gz mapconv compact.awk | |
134 # Generating $@... | |
135 @mapconv $< '1,$$' CZYBORRA compact.awk > $@ | |
136 | |
137 PTCP154.map: ${MISC_CHARMAPS}/PTCP154 mapconv compact.awk | |
138 # Generating $@... | |
139 @mapconv $< '/^0x/' IANA compact.awk > $@ | |
140 | |
141 stdenc.map: ${MISC_CHARMAPS}/stdenc.txt mapconv compact.awk | |
142 # Generating $@... | |
143 @mapconv $< '/^[0-9A-Fa-f]/' UNICODE compact.awk > $@ | |
144 | |
145 symbol.map: ${MISC_CHARMAPS}/symbol.txt mapconv compact.awk | |
146 # Generating $@... | |
147 @mapconv $< '/^[0-9A-Fa-f]/' UNICODE compact.awk > $@ | |
148 | |
149 CP720.map: ${MISC_CHARMAPS}/720.htm mapconv compact.awk | |
150 # Generating $@... | |
151 @mapconv $< '/^[0-9A-F]/' MICROSOFT compact.awk > $@ | |
152 | |
153 CP858.map: ${MISC_CHARMAPS}/858.htm mapconv compact.awk | |
154 # Generating $@... | |
155 @mapconv $< '/^[0-9A-F]/' MICROSOFT compact.awk > $@ | |
156 | |
157 CP949-2BYTE.map: ${GLIBC_CHARMAPS}/CP949 mapconv compact.awk | |
158 # Generating $@... | |
159 @mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@ | |
160 | |
161 GB2312.map: ${GLIBC_CHARMAPS}/GB2312 mapconv compact.awk | |
162 # Generating $@... | |
163 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@ | |
164 | |
165 GBK.map: ${GLIBC_CHARMAPS}/GBK mapconv compact.awk | |
166 # Generating $@... | |
167 @mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@ | |
168 | |
169 GB180302.map: ${GLIBC_CHARMAPS}/GB18030 mapconv gb180302.awk | |
170 # Generating $@... | |
171 @mapconv $< '/^<.*[ ]\/x..\/x..[ ]/' GLIBC-2 gb180302.awk > $@ | |
172 | |
173 GB180304.map: GB180302.map gb180304.awk | |
174 # Generating $@... | |
175 @$(AWK) -f gb180304.awk < $< > $@ | |
176 | |
177 JISX0201.map: ${GLIBC_CHARMAPS}/JIS_X0201 mapconv compact.awk | |
178 # Generating $@... | |
179 @mapconv $< '/^<.*[ ]\/x[0-9]/' GLIBC-1 compact.awk > $@ | |
180 @echo "# Generated by hand" >> $@ | |
181 @echo "0xA1-0xDF 0xFF61" >> $@ | |
182 | |
183 JISX0208.map: ${GLIBC_CHARMAPS}/EUC-JP mapconv | |
184 # Generating $@... | |
89751 | 185 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 \ |
186 | sed 's/0x2015/0x2014/' > $@ | |
88123 | 187 |
188 JISX0212.map: ${GLIBC_CHARMAPS}/EUC-JP mapconv compact.awk | |
189 # Generating $@... | |
190 @mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' GLIBC-2-7 compact.awk > $@ | |
191 | |
192 JISX2131.map: ${GLIBC_CHARMAPS}/EUC-JISX0213 mapconv | |
193 # Generating $@... | |
89773
7066b252cbed
(JISX2131.map): Convert 0x2015 to 0x2014.
Kenichi Handa <handa@m17n.org>
parents:
89769
diff
changeset
|
194 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 \ |
89776 | 195 | sed -e 's/0x2015/0x2014/' -e 's/0x2299/0x29BF/' > $@ |
88123 | 196 |
197 JISX2132.map: ${GLIBC_CHARMAPS}/EUC-JISX0213 mapconv | |
198 # Generating $@... | |
199 @mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' GLIBC-2-7 > $@ | |
200 | |
89769
95fd0085db37
(CJK): Include JISX213A.map.
Kenichi Handa <handa@m17n.org>
parents:
89751
diff
changeset
|
201 JISX213A.map: |
95fd0085db37
(CJK): Include JISX213A.map.
Kenichi Handa <handa@m17n.org>
parents:
89751
diff
changeset
|
202 # Generating $@ |
95fd0085db37
(CJK): Include JISX213A.map.
Kenichi Handa <handa@m17n.org>
parents:
89751
diff
changeset
|
203 @(echo "0x2E21 0x4FF1"; \ |
95fd0085db37
(CJK): Include JISX213A.map.
Kenichi Handa <handa@m17n.org>
parents:
89751
diff
changeset
|
204 echo "0x2F7E 0x525D"; \ |
95fd0085db37
(CJK): Include JISX213A.map.
Kenichi Handa <handa@m17n.org>
parents:
89751
diff
changeset
|
205 echo "0x4F54 0x20B9F"; \ |
95fd0085db37
(CJK): Include JISX213A.map.
Kenichi Handa <handa@m17n.org>
parents:
89751
diff
changeset
|
206 echo "0x4F7E 0x541E"; \ |
95fd0085db37
(CJK): Include JISX213A.map.
Kenichi Handa <handa@m17n.org>
parents:
89751
diff
changeset
|
207 echo "0x7427 0x5653"; \ |
95fd0085db37
(CJK): Include JISX213A.map.
Kenichi Handa <handa@m17n.org>
parents:
89751
diff
changeset
|
208 echo "0x7E7A 0x59F8"; \ |
95fd0085db37
(CJK): Include JISX213A.map.
Kenichi Handa <handa@m17n.org>
parents:
89751
diff
changeset
|
209 echo "0x7E7B 0x5C5B"; \ |
95fd0085db37
(CJK): Include JISX213A.map.
Kenichi Handa <handa@m17n.org>
parents:
89751
diff
changeset
|
210 echo "0x7E7C 0x5E77"; \ |
95fd0085db37
(CJK): Include JISX213A.map.
Kenichi Handa <handa@m17n.org>
parents:
89751
diff
changeset
|
211 echo "0x7E7D 0x7626"; \ |
95fd0085db37
(CJK): Include JISX213A.map.
Kenichi Handa <handa@m17n.org>
parents:
89751
diff
changeset
|
212 echo "0x7E7E 0x7E6B") > $@ |
95fd0085db37
(CJK): Include JISX213A.map.
Kenichi Handa <handa@m17n.org>
parents:
89751
diff
changeset
|
213 |
89747
09b8cb925c81
(CP932-2BYTE.map): Call mapconv with cp932.awk.
Kenichi Handa <handa@m17n.org>
parents:
89738
diff
changeset
|
214 CP932-2BYTE.map: ${MISC_CHARMAPS}/cp932.txt mapconv cp932.awk |
89738
d00dd977bedf
(CJK): Include CP932-2BYTE.map
Kenichi Handa <handa@m17n.org>
parents:
88123
diff
changeset
|
215 # Generating $@... |
89747
09b8cb925c81
(CP932-2BYTE.map): Call mapconv with cp932.awk.
Kenichi Handa <handa@m17n.org>
parents:
89738
diff
changeset
|
216 @mapconv $< '/^0x[89A-F][0-9A-F][0-9A-F]/' UNICODE2 cp932.awk > $@ |
89738
d00dd977bedf
(CJK): Include CP932-2BYTE.map
Kenichi Handa <handa@m17n.org>
parents:
88123
diff
changeset
|
217 |
89751 | 218 cp51932.el: CP932-2BYTE.map cp51932.awk |
219 @$(AWK) -f cp51932.awk < CP932-2BYTE.map > $@ | |
220 | |
221 eucjp-ms.el: ${MISC_CHARMAPS}/eucJP-13th.txt ${MISC_CHARMAPS}/eucJP-udc.txt \ | |
222 ${MISC_CHARMAPS}/eucJP-ibmext.txt eucjp-ms.awk | |
223 @(cd ${MISC_CHARMAPS}; \ | |
224 cat eucJP-13th.txt eucJP-udc.txt eucJP-ibmext.txt) \ | |
225 | $(AWK) -f eucjp-ms.awk > $@ | |
226 | |
88123 | 227 JISC6226.map : ${MISC_CHARMAPS}/Uni2JIS mapconv kuten.awk |
228 # Generating $@... | |
229 @mapconv $< '/^[^#].*0-/' YASUOKA kuten.awk > $@ | |
230 | |
231 KSC5601.map: ${GLIBC_CHARMAPS}/EUC-KR mapconv compact.awk | |
232 # Generating $@... | |
233 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@ | |
234 | |
235 BIG5.map: ${GLIBC_CHARMAPS}/BIG5 mapconv compact.awk | |
236 # Generating $@... | |
237 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2 > $@ | |
238 | |
239 BIG5-1.map: BIG5.map mapconv big5.awk | |
240 # Generating $@... | |
241 @echo "Generated from $<" > $@ | |
242 @sed -n -e '/0xa140/,/0xc8fe/p' < $< | gawk -f big5.awk >> $@ | |
243 | |
244 BIG5-2.map: BIG5.map mapconv big5.awk | |
245 # Generating $@... | |
246 @echo "Generated from $<" > $@ | |
247 @sed -n -e '/0xc940/,$$ p' < $< | gawk -f big5.awk >> $@ | |
248 | |
249 BIG5-HKSCS.map: ${GLIBC_CHARMAPS}/BIG5-HKSCS mapconv compact.awk | |
250 # Generating $@... | |
251 @mapconv $< '/^<.*[ ]\/x[89a-f].\//' GLIBC-2 compact.awk > $@ | |
252 | |
253 JOHAB.map: ${GLIBC_CHARMAPS}/JOHAB mapconv compact.awk | |
254 # Generating $@... | |
255 @mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@ | |
256 | |
257 CNS-1.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
258 # Generating $@... | |
259 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@ | |
260 | |
261 CNS-2.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
262 # Generating $@... | |
263 @mapconv $< '/^<.*\/x8e\/xa2/s,/x8e/xa2,,' GLIBC-2-7 compact.awk > $@ | |
264 | |
265 CNS-3.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
266 # Generating $@... | |
267 @mapconv $< '/^<.*\/x8e\/xa3/ s,/x8e/xa3,,' GLIBC-2-7 compact.awk > $@ | |
268 | |
269 CNS-4.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
270 # Generating $@... | |
271 @mapconv $< '/^<.*\/x8e\/xa4/ s,/x8e/xa4,,' GLIBC-2-7 compact.awk > $@ | |
272 | |
273 CNS-5.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
274 # Generating $@... | |
275 @mapconv $< '/^<.*\/x8e\/xa5/ s,/x8e/xa5,,' GLIBC-2-7 compact.awk > $@ | |
276 | |
277 CNS-6.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
278 # Generating $@... | |
279 @mapconv $< '/^<.*\/x8e\/xa6/ s,/x8e/xa6,,' GLIBC-2-7 compact.awk > $@ | |
280 | |
281 CNS-7.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
282 # Generating $@... | |
283 @mapconv $< '/^<.*\/x8e\/xa7/ s,/x8e/xa7,,' GLIBC-2-7 compact.awk > $@ | |
284 | |
285 CNS-F.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
286 # Generating $@... | |
287 @mapconv $< '/^<.*\/x8e\/xaf/ s,/x8e/xaf,,' GLIBC-2-7 compact.awk > $@ | |
288 | |
289 # General target to produce map files for mule charsets. | |
290 MULE-%.map: mule-charsets.el | |
291 # Generating $@... | |
292 @${OLDEMACS} -batch -l ./mule-charsets.el $@ | |
293 | |
294 # General target to produce map files for ISO-8859, GEORGIAN, and | |
295 # EBCDIC charsets. We can not use the original file name because of | |
296 # file name limit on DOS. "KA" is ISO 639 language code for Georgian. | |
297 | |
298 8859-%.map: ${GLIBC_CHARMAPS}/ISO-8859-% mapconv compact.awk | |
299 # Generating $@... | |
300 @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@ | |
301 | |
302 KA-%.map: ${GLIBC_CHARMAPS}/GEORGIAN-% mapconv compact.awk | |
303 # Generating $@... | |
304 @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@ | |
305 | |
306 EBCDIC%.map: ${GLIBC_CHARMAPS}/EBCDIC-% mapconv compact.awk | |
307 # Generating $@... | |
308 @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@ | |
309 | |
310 # General target to produce map files for single-byte charsets. | |
311 | |
312 %.map: ${GLIBC_CHARMAPS}/% mapconv compact.awk | |
313 # Generating $@... | |
314 @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@ | |
315 | |
89751 | 316 install: ${CHARSETS} ${TRANS_TABLE} |
88123 | 317 cp ${CHARSETS} ../../etc/charsets |
89751 | 318 cp ${TRANS_TABLE} ../../lisp/international |
88123 | 319 |
320 # Clear files that are automatically generated. | |
321 clean: | |
322 rm -f ${CHARSETS} |