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 \
|
|
39 ksc5601-1987.map \
|
|
40 jisx0201.map \
|
|
41 jisx0208-1990.map \
|
|
42 jisx0212-1990.map \
|
|
43 cns11643-1.map \
|
|
44 cns11643-2.map \
|
|
45 big5.map \
|
|
46 viscii.map \
|
|
47 koi8-r.map \
|
|
48 ibm866.map \
|
|
49 mac-roman.map \
|
|
50
|
|
51 all: ${MAPS}
|
|
52
|
|
53 GLIBCDIR=../../../src/glibc-2.2.4/localedata/charmaps
|
|
54
|
|
55 8859-%.map: ${GLIBCDIR}/ISO-8859-%
|
|
56 ${SED} -n \
|
|
57 -e '/^<U[^x]*x[89A-Fa-f]/s/<U\(....\)[^x]*\(...\).*/0\2 0x\1/p' \
|
|
58 < $< > $@
|
|
59
|
|
60 gb2312-1980.map: ${GLIBCDIR}/GB2312
|
|
61 ${SED} -n -e \
|
|
62 '/x[a-f]..x[a-f]/s/<U\(....\)[^x]*\(...\).\(...\).*/0x\2\3 0x\1/p' \
|
|
63 < $< \
|
|
64 | ${SED} -e 's/xa/2/g' -e 's/xb/3/g' -e 's/xc/4/g' \
|
|
65 -e 's/xd/5/g' -e 's/xe/6/g' -e 's/xf/7/g' \
|
|
66 > $@
|
|
67
|
|
68 ksc5601-1987.map: ${GLIBCDIR}/EUC-KR
|
|
69 ${SED} -n -e \
|
|
70 '/x[a-f]..x[a-f]/s/<U\(....\)[^x]*\(...\).\(...\).*/0x\2\3 0x\1/p' \
|
|
71 < $< \
|
|
72 | ${SED} -e 's/xa/2/g' -e 's/xb/3/g' -e 's/xc/4/g' \
|
|
73 -e 's/xd/5/g' -e 's/xe/6/g' -e 's/xf/7/g' \
|
|
74 > $@
|
|
75
|
|
76 jisx0201.map: ${GLIBCDIR}/JIS_C6220-1969-RO ${GLIBCDIR}/EUC-JP
|
|
77 ${SED} -n -e '/^<U/s/<U\(....\)[^x]*\(...\).*/0\2 0x\1/p' \
|
|
78 < ${GLIBCDIR}/JIS_C6220-1969-RO > $@
|
|
79 ${SED} -n -e '/x8e/s/<U\(....\)[^x]*....\(...\).*/0\2 0x\1/p' \
|
|
80 < ${GLIBCDIR}/EUC-JP >> $@
|
|
81
|
|
82 # We map 0x2140 to U+FF3C (FULL WIDTH REVERSE SOLIDUS), not to U+005C
|
|
83 # (REVERSE SOLIDUS).
|
|
84 jisx0208-1990.map: ${GLIBCDIR}/EUC-JP
|
|
85 ${SED} -n -e \
|
|
86 '/^[^x]*x[a-f]..x[a-f]/s,<U\(....\)[^/]*\(........\).*,0x\2 0x\1,p' \
|
|
87 < $< \
|
|
88 | ${SED} -e 's,/xa,2,g' -e 's,/xb,3,g' -e 's,/xc,4,g' \
|
|
89 -e 's,/xd,5,g' -e 's,/xe,6,g' -e 's,/xf,7,g' \
|
|
90 > $@
|
|
91
|
|
92 jisx0212-1990.map: ${GLIBCDIR}/EUC-JP
|
|
93 ${SED} -n -e \
|
|
94 '/x8f/s,<U\(....\)[^/]*/x8f\(........\).*,0x\2 0x\1,p' \
|
|
95 < $< \
|
|
96 | ${SED} -e 's,/xa,2,g' -e 's,/xb,3,g' -e 's,/xc,4,g' \
|
|
97 -e 's,/xd,5,g' -e 's,/xe,6,g' -e 's,/xf,7,g' \
|
|
98 > $@
|
|
99
|
|
100 cns11643-1.map: ${GLIBCDIR}/EUC-TW
|
|
101 ${SED} -n -e \
|
|
102 '/^[^x]*x[a-f]..x[a-f]/s,<U\(....\)[^/]*\(........\).*,0x\2 0x\1,p' \
|
|
103 < $< \
|
|
104 | ${SED} -e 's,/xa,2,g' -e 's,/xb,3,g' -e 's,/xc,4,g' \
|
|
105 -e 's,/xd,5,g' -e 's,/xe,6,g' -e 's,/xf,7,g' \
|
|
106 > $@
|
|
107
|
|
108 cns11643-2.map: ${GLIBCDIR}/EUC-TW
|
|
109 ${SED} -n -e \
|
|
110 '/x8e.xa2/s,<U\(....\)[^/]*/x8e/xa2\(........\).*,0x\2 0x\1,p' \
|
|
111 < $< \
|
|
112 | ${SED} -e 's,/xa,2,g' -e 's,/xb,3,g' -e 's,/xc,4,g' \
|
|
113 -e 's,/xd,5,g' -e 's,/xe,6,g' -e 's,/xf,7,g' \
|
|
114 > $@
|
|
115
|
|
116 big5.map: ${GLIBCDIR}/BIG5
|
|
117 ${SED} -n -e \
|
|
118 '/^%I[^x]*x[a-f]/s,.*<U\(....\)[^x]*\(...\)..\(..\).*,0\2\3 0x\1,p' \
|
|
119 < $< > $@
|
|
120 ${SED} -n -e \
|
|
121 '/^<[^x]*x[a-f]/s,<U\(....\)[^x]*\(...\)..\(..\).*,0\2\3 0x\1,p' \
|
|
122 < $< >> $@
|
|
123
|
|
124 big5-extra.map: ${GLIBCDIR}/BIG5
|
|
125
|
|
126 viscii.map: ${GLIBCDIR}/VISCII
|
|
127 ${SED} -n -e \
|
|
128 '/^<U/s/<U\(....\)[^x]*x\(..\).*/0x\2 0x\1/p' < $< > $@
|
|
129
|
|
130 koi8-r.map: ${GLIBCDIR}/KOI8-R
|
|
131 ${SED} -n -e \
|
|
132 '/^<U/s/<U\(....\)[^x]*x\(..\).*/0x\2 0x\1/p' < $< > $@
|
|
133
|
|
134 ibm866.map: ${GLIBCDIR}/IBM866
|
|
135 ${SED} -n -e \
|
|
136 '/^<U/s/<U\(....\)[^x]*x\(..\).*/0x\2 0x\1/p' < $< > $@
|
|
137
|
|
138 mac-roman.map: ${GLIBCDIR}/MACINTOSH
|
|
139 ${SED} -n -e \
|
|
140 '/^<U[^x]*x[89A-Fa-f]/s/<U\(....\)[^x]*x\(..\).*/0x\2 0x\1/p' \
|
|
141 < $< > $@
|
|
142
|
|
143 maintainer-clean:
|
|
144 rm -rf ${MAPS}
|