Mercurial > emacs
annotate admin/charsets/Makefile @ 89747:09b8cb925c81
(CP932-2BYTE.map): Call mapconv with cp932.awk.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Sun, 25 Jan 2004 23:38:03 +0000 |
parents | d00dd977bedf |
children | a6bed93396e8 |
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/> | |
43 # OLDEMACS | |
44 # emacs of version 21.3.50 or later | |
45 # | |
46 # Then, do this: | |
47 # % make install | |
48 | |
49 CHARSETS = ${ISO8859} ${IBM} ${CODEPAGE} ${CJK} ${MISC} ${MULE} | |
50 | |
51 # Note: We can not prepend "ISO-" to these map files because of file | |
52 # name limits on DOS. | |
53 ISO8859 = \ | |
54 8859-2.map 8859-3.map 8859-4.map 8859-5.map 8859-6.map 8859-7.map \ | |
55 8859-8.map 8859-9.map 8859-10.map 8859-11.map 8859-13.map 8859-14.map \ | |
56 8859-15.map 8859-16.map | |
57 | |
58 IBM = \ | |
59 IBM037.map IBM038.map \ | |
60 IBM256.map IBM273.map IBM274.map IBM275.map IBM277.map IBM278.map \ | |
61 IBM280.map IBM281.map IBM284.map IBM285.map IBM290.map IBM297.map \ | |
62 IBM420.map IBM423.map IBM424.map IBM437.map IBM500.map IBM850.map \ | |
63 IBM851.map IBM852.map IBM855.map IBM856.map IBM857.map IBM860.map \ | |
64 IBM861.map IBM862.map IBM863.map IBM864.map IBM865.map IBM866.map \ | |
65 IBM868.map IBM869.map IBM870.map IBM871.map IBM874.map IBM875.map \ | |
66 IBM880.map IBM891.map IBM903.map IBM904.map IBM905.map IBM918.map \ | |
67 IBM1004.map IBM1026.map IBM1047.map | |
68 | |
69 CODEPAGE = \ | |
70 CP737.map CP775.map CP1125.map\ | |
71 CP1250.map CP1251.map CP1252.map CP1253.map CP1254.map \ | |
72 CP1255.map CP1256.map CP1257.map CP1258.map \ | |
73 CP10007.map \ | |
74 CP720.map CP858.map | |
75 | |
76 CJK = GB2312.map GBK.map GB180302.map GB180304.map \ | |
77 BIG5.map BIG5-HKSCS.map\ | |
78 CNS-1.map CNS-2.map CNS-3.map CNS-4.map CNS-5.map CNS-6.map CNS-7.map \ | |
79 CNS-F.map \ | |
80 JISX0201.map JISX0208.map JISX0212.map JISX2131.map JISX2132.map \ | |
89738
d00dd977bedf
(CJK): Include CP932-2BYTE.map
Kenichi Handa <handa@m17n.org>
parents:
88123
diff
changeset
|
81 JISC6226.map CP932-2BYTE.map\ |
88123 | 82 KSC5601.map KSC5636.map JOHAB.map |
83 | |
84 MISC = KOI-8.map KOI8-R.map KOI8-U.map KOI8-T.map ALTERNATIVNYJ.map \ | |
85 MIK.map PTCP154.map \ | |
86 TIS-620.map VISCII.map VSCII.map VSCII-2.map\ | |
87 KA-PS.map KA-ACADEMY.map \ | |
88 HP-ROMAN8.map NEXTSTEP.map MACINTOSH.map EBCDICUK.map EBCDICUS.map \ | |
89 stdenc.map symbol.map \ | |
90 CP949-2BYTE.map \ | |
91 BIG5-1.map BIG5-2.map | |
92 | |
93 # Emacs-mule charsets. | |
94 MULE = MULE-ethiopic.map MULE-ipa.map MULE-is13194.map \ | |
95 MULE-sisheng.map MULE-tibetan.map \ | |
96 MULE-lviscii.map MULE-uviscii.map | |
97 | |
98 charsets: ${CHARSETS} | |
99 | |
100 AWK = gawk | |
101 | |
102 # Rules for each charset | |
103 | |
104 VSCII.map: ${GLIBC_CHARMAPS}/TCVN5712-1 mapconv compact.awk | |
105 # Generating $@... | |
106 @mapconv $< '/^<.*[ ]\/x[0-9a-f].[ ]/' GLIBC-1 compact.awk > $@ | |
107 | |
108 VSCII-2.map: ${GLIBC_CHARMAPS}/TCVN5712-1 mapconv compact.awk | |
109 # Generating $@... | |
110 @mapconv $< '/^<.*[ ]\/x[2-7a-f].[ ]/' GLIBC-1 compact.awk \ | |
111 | sed 's/0x20-0x7F.*/0x00-0x7F 0x0000/' > $@ | |
112 | |
113 ALTERNATIVNYJ.map: IBM866.map | |
114 # Generating $@... | |
115 @echo "# Modified from ibm866 according to the chart at" > $@ | |
116 @echo "# http://www.cyrillic.com/ref/cyrillic/koi-8alt.html," >> $@ | |
117 @echo "# with guesses for the Unicodes of the glyphs." >> $@ | |
118 @sed -e '/0xF2/ s/ .*/ 0x2019/' \ | |
119 -e '/0xF3/ s/ .*/ 0x2018/' \ | |
120 -e '/0xF4/ s/ .*/ 0x0301/' \ | |
121 -e '/0xF5/ s/ .*/ 0x0300/' \ | |
122 -e '/0xF6/ s/ .*/ 0x203A/' \ | |
123 -e '/0xF7/ s/ .*/ 0x2039/' \ | |
124 -e '/0xF8/ s/ .*/ 0x2191/' \ | |
125 -e '/0xF9/ s/ .*/ 0x2193/' \ | |
126 -e '/0xFA/ s/ .*/ 0x00B1/' \ | |
127 -e '/0xFB/ s/ .*/ 0x00F7/' < $< >> $@ | |
128 | |
129 MIK.map: ${MISC_CHARMAPS}/bulgarian-mik.txt.gz mapconv compact.awk | |
130 # Generating $@... | |
131 @mapconv $< '1,$$' CZYBORRA compact.awk > $@ | |
132 | |
133 PTCP154.map: ${MISC_CHARMAPS}/PTCP154 mapconv compact.awk | |
134 # Generating $@... | |
135 @mapconv $< '/^0x/' IANA compact.awk > $@ | |
136 | |
137 stdenc.map: ${MISC_CHARMAPS}/stdenc.txt mapconv compact.awk | |
138 # Generating $@... | |
139 @mapconv $< '/^[0-9A-Fa-f]/' UNICODE compact.awk > $@ | |
140 | |
141 symbol.map: ${MISC_CHARMAPS}/symbol.txt mapconv compact.awk | |
142 # Generating $@... | |
143 @mapconv $< '/^[0-9A-Fa-f]/' UNICODE compact.awk > $@ | |
144 | |
145 CP720.map: ${MISC_CHARMAPS}/720.htm mapconv compact.awk | |
146 # Generating $@... | |
147 @mapconv $< '/^[0-9A-F]/' MICROSOFT compact.awk > $@ | |
148 | |
149 CP858.map: ${MISC_CHARMAPS}/858.htm mapconv compact.awk | |
150 # Generating $@... | |
151 @mapconv $< '/^[0-9A-F]/' MICROSOFT compact.awk > $@ | |
152 | |
153 CP949-2BYTE.map: ${GLIBC_CHARMAPS}/CP949 mapconv compact.awk | |
154 # Generating $@... | |
155 @mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@ | |
156 | |
157 GB2312.map: ${GLIBC_CHARMAPS}/GB2312 mapconv compact.awk | |
158 # Generating $@... | |
159 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@ | |
160 | |
161 GBK.map: ${GLIBC_CHARMAPS}/GBK mapconv compact.awk | |
162 # Generating $@... | |
163 @mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@ | |
164 | |
165 GB180302.map: ${GLIBC_CHARMAPS}/GB18030 mapconv gb180302.awk | |
166 # Generating $@... | |
167 @mapconv $< '/^<.*[ ]\/x..\/x..[ ]/' GLIBC-2 gb180302.awk > $@ | |
168 | |
169 GB180304.map: GB180302.map gb180304.awk | |
170 # Generating $@... | |
171 @$(AWK) -f gb180304.awk < $< > $@ | |
172 | |
173 JISX0201.map: ${GLIBC_CHARMAPS}/JIS_X0201 mapconv compact.awk | |
174 # Generating $@... | |
175 @mapconv $< '/^<.*[ ]\/x[0-9]/' GLIBC-1 compact.awk > $@ | |
176 @echo "# Generated by hand" >> $@ | |
177 @echo "0xA1-0xDF 0xFF61" >> $@ | |
178 | |
179 JISX0208.map: ${GLIBC_CHARMAPS}/EUC-JP mapconv | |
180 # Generating $@... | |
181 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 > $@ | |
182 | |
183 JISX0212.map: ${GLIBC_CHARMAPS}/EUC-JP mapconv compact.awk | |
184 # Generating $@... | |
185 @mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' GLIBC-2-7 compact.awk > $@ | |
186 | |
187 JISX2131.map: ${GLIBC_CHARMAPS}/EUC-JISX0213 mapconv | |
188 # Generating $@... | |
189 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 > $@ | |
190 | |
191 JISX2132.map: ${GLIBC_CHARMAPS}/EUC-JISX0213 mapconv | |
192 # Generating $@... | |
193 @mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' GLIBC-2-7 > $@ | |
194 | |
89747
09b8cb925c81
(CP932-2BYTE.map): Call mapconv with cp932.awk.
Kenichi Handa <handa@m17n.org>
parents:
89738
diff
changeset
|
195 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
|
196 # Generating $@... |
89747
09b8cb925c81
(CP932-2BYTE.map): Call mapconv with cp932.awk.
Kenichi Handa <handa@m17n.org>
parents:
89738
diff
changeset
|
197 @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
|
198 |
88123 | 199 JISC6226.map : ${MISC_CHARMAPS}/Uni2JIS mapconv kuten.awk |
200 # Generating $@... | |
201 @mapconv $< '/^[^#].*0-/' YASUOKA kuten.awk > $@ | |
202 | |
203 KSC5601.map: ${GLIBC_CHARMAPS}/EUC-KR mapconv compact.awk | |
204 # Generating $@... | |
205 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@ | |
206 | |
207 BIG5.map: ${GLIBC_CHARMAPS}/BIG5 mapconv compact.awk | |
208 # Generating $@... | |
209 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2 > $@ | |
210 | |
211 BIG5-1.map: BIG5.map mapconv big5.awk | |
212 # Generating $@... | |
213 @echo "Generated from $<" > $@ | |
214 @sed -n -e '/0xa140/,/0xc8fe/p' < $< | gawk -f big5.awk >> $@ | |
215 | |
216 BIG5-2.map: BIG5.map mapconv big5.awk | |
217 # Generating $@... | |
218 @echo "Generated from $<" > $@ | |
219 @sed -n -e '/0xc940/,$$ p' < $< | gawk -f big5.awk >> $@ | |
220 | |
221 BIG5-HKSCS.map: ${GLIBC_CHARMAPS}/BIG5-HKSCS mapconv compact.awk | |
222 # Generating $@... | |
223 @mapconv $< '/^<.*[ ]\/x[89a-f].\//' GLIBC-2 compact.awk > $@ | |
224 | |
225 JOHAB.map: ${GLIBC_CHARMAPS}/JOHAB mapconv compact.awk | |
226 # Generating $@... | |
227 @mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@ | |
228 | |
229 CNS-1.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
230 # Generating $@... | |
231 @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@ | |
232 | |
233 CNS-2.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
234 # Generating $@... | |
235 @mapconv $< '/^<.*\/x8e\/xa2/s,/x8e/xa2,,' GLIBC-2-7 compact.awk > $@ | |
236 | |
237 CNS-3.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
238 # Generating $@... | |
239 @mapconv $< '/^<.*\/x8e\/xa3/ s,/x8e/xa3,,' GLIBC-2-7 compact.awk > $@ | |
240 | |
241 CNS-4.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
242 # Generating $@... | |
243 @mapconv $< '/^<.*\/x8e\/xa4/ s,/x8e/xa4,,' GLIBC-2-7 compact.awk > $@ | |
244 | |
245 CNS-5.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
246 # Generating $@... | |
247 @mapconv $< '/^<.*\/x8e\/xa5/ s,/x8e/xa5,,' GLIBC-2-7 compact.awk > $@ | |
248 | |
249 CNS-6.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
250 # Generating $@... | |
251 @mapconv $< '/^<.*\/x8e\/xa6/ s,/x8e/xa6,,' GLIBC-2-7 compact.awk > $@ | |
252 | |
253 CNS-7.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
254 # Generating $@... | |
255 @mapconv $< '/^<.*\/x8e\/xa7/ s,/x8e/xa7,,' GLIBC-2-7 compact.awk > $@ | |
256 | |
257 CNS-F.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk | |
258 # Generating $@... | |
259 @mapconv $< '/^<.*\/x8e\/xaf/ s,/x8e/xaf,,' GLIBC-2-7 compact.awk > $@ | |
260 | |
261 # General target to produce map files for mule charsets. | |
262 MULE-%.map: mule-charsets.el | |
263 # Generating $@... | |
264 @${OLDEMACS} -batch -l ./mule-charsets.el $@ | |
265 | |
266 # General target to produce map files for ISO-8859, GEORGIAN, and | |
267 # EBCDIC charsets. We can not use the original file name because of | |
268 # file name limit on DOS. "KA" is ISO 639 language code for Georgian. | |
269 | |
270 8859-%.map: ${GLIBC_CHARMAPS}/ISO-8859-% mapconv compact.awk | |
271 # Generating $@... | |
272 @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@ | |
273 | |
274 KA-%.map: ${GLIBC_CHARMAPS}/GEORGIAN-% mapconv compact.awk | |
275 # Generating $@... | |
276 @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@ | |
277 | |
278 EBCDIC%.map: ${GLIBC_CHARMAPS}/EBCDIC-% mapconv compact.awk | |
279 # Generating $@... | |
280 @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@ | |
281 | |
282 # General target to produce map files for single-byte charsets. | |
283 | |
284 %.map: ${GLIBC_CHARMAPS}/% mapconv compact.awk | |
285 # Generating $@... | |
286 @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@ | |
287 | |
288 install: ${CHARSETS} | |
289 cp ${CHARSETS} ../../etc/charsets | |
290 | |
291 # Clear files that are automatically generated. | |
292 clean: | |
293 rm -f ${CHARSETS} |