Mercurial > emacs
annotate etc/charsets/Makefile @ 89430:28939d6dacea
(MAPS): Change gb18030.map to gb18030-2.map
and gb18030-4.map.
(gb18030.map): Delete this target.
(gb18030-2.map, gb18030-4.map): New targets.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 20 May 2003 13:06:09 +0000 |
parents | c9c8fd3a8523 |
children | d1fc6a0e4772 |
rev | line source |
---|---|
88417 | 1 # Makefile for charset maps (for maintainers only) |
2 # Copyright (C) 2001, 2002 | |
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 | |
20 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
21 # Boston, MA 02111-1307, USA. | |
22 | |
23 SED = sed | |
24 | |
25 MAPS = 8859-2.map \ | |
26 8859-3.map \ | |
27 8859-4.map \ | |
28 8859-5.map \ | |
29 8859-6.map \ | |
30 8859-7.map \ | |
31 8859-8.map \ | |
32 8859-9.map \ | |
33 8859-10.map \ | |
34 8859-13.map \ | |
35 8859-14.map \ | |
36 8859-15.map \ | |
37 8859-16.map \ | |
38 gb2312-1980.map \ | |
88447
c9c8fd3a8523
(MAPS): Add gbk.map and gb18030-bmp.map.
Kenichi Handa <handa@m17n.org>
parents:
88417
diff
changeset
|
39 gbk.map \ |
88417 | 40 ksc5601-1987.map \ |
41 jisx0201.map \ | |
42 jisx0208-1990.map \ | |
43 jisx0212-1990.map \ | |
44 cns11643-1.map \ | |
45 cns11643-2.map \ | |
46 big5.map \ | |
47 viscii.map \ | |
48 koi8-r.map \ | |
49 ibm866.map \ | |
89430
28939d6dacea
(MAPS): Change gb18030.map to gb18030-2.map
Kenichi Handa <handa@m17n.org>
parents:
88447
diff
changeset
|
50 mac-roman.map |
88417 | 51 |
52 all: ${MAPS} | |
53 | |
89430
28939d6dacea
(MAPS): Change gb18030.map to gb18030-2.map
Kenichi Handa <handa@m17n.org>
parents:
88447
diff
changeset
|
54 GLIBCDIR=../../../m17n-db/glibc-2.3/localedata/charmaps |
88447
c9c8fd3a8523
(MAPS): Add gbk.map and gb18030-bmp.map.
Kenichi Handa <handa@m17n.org>
parents:
88417
diff
changeset
|
55 ICUDIR=../../../icu/data |
88417 | 56 |
57 8859-%.map: ${GLIBCDIR}/ISO-8859-% | |
58 ${SED} -n \ | |
59 -e '/^<U[^x]*x[89A-Fa-f]/s/<U\(....\)[^x]*\(...\).*/0\2 0x\1/p' \ | |
60 < $< > $@ | |
61 | |
62 gb2312-1980.map: ${GLIBCDIR}/GB2312 | |
63 ${SED} -n -e \ | |
64 '/x[a-f]..x[a-f]/s/<U\(....\)[^x]*\(...\).\(...\).*/0x\2\3 0x\1/p' \ | |
65 < $< \ | |
66 | ${SED} -e 's/xa/2/g' -e 's/xb/3/g' -e 's/xc/4/g' \ | |
67 -e 's/xd/5/g' -e 's/xe/6/g' -e 's/xf/7/g' \ | |
68 > $@ | |
69 | |
88447
c9c8fd3a8523
(MAPS): Add gbk.map and gb18030-bmp.map.
Kenichi Handa <handa@m17n.org>
parents:
88417
diff
changeset
|
70 gbk.map: ${GLIBCDIR}/GBK |
c9c8fd3a8523
(MAPS): Add gbk.map and gb18030-bmp.map.
Kenichi Handa <handa@m17n.org>
parents:
88417
diff
changeset
|
71 ${SED} -n -e \ |
c9c8fd3a8523
(MAPS): Add gbk.map and gb18030-bmp.map.
Kenichi Handa <handa@m17n.org>
parents:
88417
diff
changeset
|
72 '/^<.*x[0-9a-f]..x[0-9a-f]/s/<U\(....\)[^x]*x\(..\)..\(..\).*/0x\2\3 0x\1/p' \ |
c9c8fd3a8523
(MAPS): Add gbk.map and gb18030-bmp.map.
Kenichi Handa <handa@m17n.org>
parents:
88417
diff
changeset
|
73 < $< > $@ |
c9c8fd3a8523
(MAPS): Add gbk.map and gb18030-bmp.map.
Kenichi Handa <handa@m17n.org>
parents:
88417
diff
changeset
|
74 |
88417 | 75 ksc5601-1987.map: ${GLIBCDIR}/EUC-KR |
76 ${SED} -n -e \ | |
77 '/x[a-f]..x[a-f]/s/<U\(....\)[^x]*\(...\).\(...\).*/0x\2\3 0x\1/p' \ | |
78 < $< \ | |
79 | ${SED} -e 's/xa/2/g' -e 's/xb/3/g' -e 's/xc/4/g' \ | |
80 -e 's/xd/5/g' -e 's/xe/6/g' -e 's/xf/7/g' \ | |
81 > $@ | |
82 | |
83 jisx0201.map: ${GLIBCDIR}/JIS_C6220-1969-RO ${GLIBCDIR}/EUC-JP | |
84 ${SED} -n -e '/^<U/s/<U\(....\)[^x]*\(...\).*/0\2 0x\1/p' \ | |
85 < ${GLIBCDIR}/JIS_C6220-1969-RO > $@ | |
86 ${SED} -n -e '/x8e/s/<U\(....\)[^x]*....\(...\).*/0\2 0x\1/p' \ | |
87 < ${GLIBCDIR}/EUC-JP >> $@ | |
88 | |
89 # We map 0x2140 to U+FF3C (FULL WIDTH REVERSE SOLIDUS), not to U+005C | |
90 # (REVERSE SOLIDUS). | |
91 jisx0208-1990.map: ${GLIBCDIR}/EUC-JP | |
92 ${SED} -n -e \ | |
93 '/^[^x]*x[a-f]..x[a-f]/s,<U\(....\)[^/]*\(........\).*,0x\2 0x\1,p' \ | |
94 < $< \ | |
95 | ${SED} -e 's,/xa,2,g' -e 's,/xb,3,g' -e 's,/xc,4,g' \ | |
96 -e 's,/xd,5,g' -e 's,/xe,6,g' -e 's,/xf,7,g' \ | |
97 > $@ | |
98 | |
99 jisx0212-1990.map: ${GLIBCDIR}/EUC-JP | |
100 ${SED} -n -e \ | |
101 '/x8f/s,<U\(....\)[^/]*/x8f\(........\).*,0x\2 0x\1,p' \ | |
102 < $< \ | |
103 | ${SED} -e 's,/xa,2,g' -e 's,/xb,3,g' -e 's,/xc,4,g' \ | |
104 -e 's,/xd,5,g' -e 's,/xe,6,g' -e 's,/xf,7,g' \ | |
105 > $@ | |
106 | |
107 cns11643-1.map: ${GLIBCDIR}/EUC-TW | |
108 ${SED} -n -e \ | |
109 '/^[^x]*x[a-f]..x[a-f]/s,<U\(....\)[^/]*\(........\).*,0x\2 0x\1,p' \ | |
110 < $< \ | |
111 | ${SED} -e 's,/xa,2,g' -e 's,/xb,3,g' -e 's,/xc,4,g' \ | |
112 -e 's,/xd,5,g' -e 's,/xe,6,g' -e 's,/xf,7,g' \ | |
113 > $@ | |
114 | |
115 cns11643-2.map: ${GLIBCDIR}/EUC-TW | |
116 ${SED} -n -e \ | |
117 '/x8e.xa2/s,<U\(....\)[^/]*/x8e/xa2\(........\).*,0x\2 0x\1,p' \ | |
118 < $< \ | |
119 | ${SED} -e 's,/xa,2,g' -e 's,/xb,3,g' -e 's,/xc,4,g' \ | |
120 -e 's,/xd,5,g' -e 's,/xe,6,g' -e 's,/xf,7,g' \ | |
121 > $@ | |
122 | |
123 big5.map: ${GLIBCDIR}/BIG5 | |
124 ${SED} -n -e \ | |
125 '/^%I[^x]*x[a-f]/s,.*<U\(....\)[^x]*\(...\)..\(..\).*,0\2\3 0x\1,p' \ | |
126 < $< > $@ | |
127 ${SED} -n -e \ | |
128 '/^<[^x]*x[a-f]/s,<U\(....\)[^x]*\(...\)..\(..\).*,0\2\3 0x\1,p' \ | |
129 < $< >> $@ | |
130 | |
131 big5-extra.map: ${GLIBCDIR}/BIG5 | |
132 | |
133 viscii.map: ${GLIBCDIR}/VISCII | |
134 ${SED} -n -e \ | |
135 '/^<U/s/<U\(....\)[^x]*x\(..\).*/0x\2 0x\1/p' < $< > $@ | |
136 | |
137 koi8-r.map: ${GLIBCDIR}/KOI8-R | |
138 ${SED} -n -e \ | |
139 '/^<U/s/<U\(....\)[^x]*x\(..\).*/0x\2 0x\1/p' < $< > $@ | |
140 | |
141 ibm866.map: ${GLIBCDIR}/IBM866 | |
142 ${SED} -n -e \ | |
143 '/^<U/s/<U\(....\)[^x]*x\(..\).*/0x\2 0x\1/p' < $< > $@ | |
144 | |
145 mac-roman.map: ${GLIBCDIR}/MACINTOSH | |
146 ${SED} -n -e \ | |
147 '/^<U[^x]*x[89A-Fa-f]/s/<U\(....\)[^x]*x\(..\).*/0x\2 0x\1/p' \ | |
148 < $< > $@ | |
149 | |
89430
28939d6dacea
(MAPS): Change gb18030.map to gb18030-2.map
Kenichi Handa <handa@m17n.org>
parents:
88447
diff
changeset
|
150 gb18030-2.map: ${GLIBCDIR}/GB18030 gb18030-2.awk |
28939d6dacea
(MAPS): Change gb18030.map to gb18030-2.map
Kenichi Handa <handa@m17n.org>
parents:
88447
diff
changeset
|
151 ${SED} -n '/^<U....>[ ]*\/x..\/x..[ ]/ p' < $< \ |
28939d6dacea
(MAPS): Change gb18030.map to gb18030-2.map
Kenichi Handa <handa@m17n.org>
parents:
88447
diff
changeset
|
152 | ${SED} -e 's,<U\([^>]*\)>[ ]*/x\(..\)/x\(..\).*$$,0x\2\3 0x\1,' \ |
28939d6dacea
(MAPS): Change gb18030.map to gb18030-2.map
Kenichi Handa <handa@m17n.org>
parents:
88447
diff
changeset
|
153 | sort | gawk -f gb18030-2.awk > $@ |
28939d6dacea
(MAPS): Change gb18030.map to gb18030-2.map
Kenichi Handa <handa@m17n.org>
parents:
88447
diff
changeset
|
154 |
28939d6dacea
(MAPS): Change gb18030.map to gb18030-2.map
Kenichi Handa <handa@m17n.org>
parents:
88447
diff
changeset
|
155 gb18030-4byte.map: gb18030-2.map gb18030-4.awk |
28939d6dacea
(MAPS): Change gb18030.map to gb18030-2.map
Kenichi Handa <handa@m17n.org>
parents:
88447
diff
changeset
|
156 gawk -f gb18030-4.awk < $< > $@ |
88447
c9c8fd3a8523
(MAPS): Add gbk.map and gb18030-bmp.map.
Kenichi Handa <handa@m17n.org>
parents:
88417
diff
changeset
|
157 |
88417 | 158 maintainer-clean: |
159 rm -rf ${MAPS} |