changeset 88447:c9c8fd3a8523

(MAPS): Add gbk.map and gb18030-bmp.map. (ICUDIR): New macro. (gbk.map, gb18030-bmp.map): New targets.
author Kenichi Handa <handa@m17n.org>
date Tue, 07 May 2002 04:46:19 +0000
parents 25703715d32e
children d83b3c05ffab
files etc/charsets/Makefile
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/etc/charsets/Makefile	Tue Apr 09 07:42:27 2002 +0000
+++ b/etc/charsets/Makefile	Tue May 07 04:46:19 2002 +0000
@@ -36,6 +36,7 @@
 	8859-15.map \
 	8859-16.map \
 	gb2312-1980.map \
+	gbk.map \
 	ksc5601-1987.map \
 	jisx0201.map \
 	jisx0208-1990.map \
@@ -47,10 +48,12 @@
 	koi8-r.map \
 	ibm866.map \
 	mac-roman.map \
+	gb18030-bmp.map
 
 all: ${MAPS}
 
 GLIBCDIR=../../../src/glibc-2.2.4/localedata/charmaps
+ICUDIR=../../../icu/data
 
 8859-%.map: ${GLIBCDIR}/ISO-8859-%
 	${SED} -n \
@@ -65,6 +68,11 @@
 		   -e 's/xd/5/g' -e 's/xe/6/g' -e 's/xf/7/g' \
 	  > $@
 
+gbk.map: ${GLIBCDIR}/GBK
+	${SED} -n -e \
+	  '/^<.*x[0-9a-f]..x[0-9a-f]/s/<U\(....\)[^x]*x\(..\)..\(..\).*/0x\2\3 0x\1/p' \
+	  < $< > $@
+
 ksc5601-1987.map: ${GLIBCDIR}/EUC-KR
 	${SED} -n -e \
 	  '/x[a-f]..x[a-f]/s/<U\(....\)[^x]*\(...\).\(...\).*/0x\2\3 0x\1/p' \
@@ -140,5 +148,8 @@
 	  '/^<U[^x]*x[89A-Fa-f]/s/<U\(....\)[^x]*x\(..\).*/0x\2 0x\1/p' \
 	  < $< > $@
 
+gb18030-bmp.map: ${ICUDIR}/gb18030.ucm gb18030.awk
+	${SED} -n -e '/CHARMAP/,/END CHARMAP/p' < $< | gawk -f gb18030.awk > $@
+
 maintainer-clean:
 	rm -rf ${MAPS}