summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2009-06-12 07:23:10 +0000
committerKenichi Handa <handa@m17n.org>2009-06-12 07:23:10 +0000
commit9cf3cd77a2168690bc69a88b1fdc62c913f6f307 (patch)
tree5158cc68c8c3425437333866b39926ab79694bae /admin
parent64ace564ee79038f9b1d1886772c42679e164505 (diff)
downloademacs-9cf3cd77a2168690bc69a88b1fdc62c913f6f307.tar.gz
Maps depend on files under mapfiles or ${GLIBC_CHARMAPS}.
Diffstat (limited to 'admin')
-rw-r--r--admin/charsets/Makefile130
1 files changed, 51 insertions, 79 deletions
diff --git a/admin/charsets/Makefile b/admin/charsets/Makefile
index 8ad294be1f3..9293924d671 100644
--- a/admin/charsets/Makefile
+++ b/admin/charsets/Makefile
@@ -20,38 +20,12 @@
# Commentary:
-# At first, set these environment variables:
-# GLIBC_CHARMAPS
-# Directory of glibc-VERSION/localedate/charmaps.
-# VERSION must be 2.3 or the later.
-# MISC_CHARMAPS
-# Direcory containing these charmap files:
-# o bulgarian-mik.txt.gz
-# provided at <http://czyborra.com/charsets/>
-# o PTCP154
-# provided at <http://www.iana.org/assignments/charset-reg/>
-# o stdenc.txt and symbol.txt
-# provided at <http://www.unicode.org/Public/MAPPINGS/>
-# o cp932.txt
-# provided at <http://www.unicode.org/Public/MAPPINGS/VENDERS>
-# o Uni2JIS
-# provided at <http://kanji.zinbun.kyoto-u.ac.jp/~yasuoka/CJK.html>
-# o 720.htm and 858.htm
-# provided at <http://www.microsoft.com/globaldev/reference/oem/>
-# o eucJP-13th.txt, eucJP-udc.txt, eucJP-ibmext.txt
-# provided at <http://www.opengroup.or.jp/jvc/cde/>
-# o cns2ucsdkw.txt
-# available by:
-# % cvs -d :pserver:anonymous@cvs.kanji-database.sourceforge.net:\
-# /cvsroot/kanji-database login
-# % cvs -d :pserver:anonymous@cvs.kanji-database.sourceforge.net:\
-# /cvsroot/kanji-database co kanji-database
-# OLDEMACS
-# emacs of version 21.3.50 or later
-#
-# Then, do this:
-# % make XXX.map (or make all)
-# % make install
+# If your system doesn't have the directory /usr/share/i18n/charmaps,
+# get the source of the latest glibc, gzip all the charmap files in
+# the directory "localedate/charmaps", and set the variable
+# GLIBC_CHARMAPS to that directory.
+
+GLIBC_CHARMAPS=/usr/share/i18n/charmaps
CHARSETS = ${ISO8859} ${IBM} ${CODEPAGE} ${CJK} ${MISC} ${MULE}
@@ -110,21 +84,22 @@ AWK = gawk
# Rules for each charset
-VSCII.map: ${GLIBC_CHARMAPS}/TCVN5712-1 mapconv compact.awk
+VSCII.map: ${GLIBC_CHARMAPS}/TCVN5712-1.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x[0-9a-f].[ ]/' GLIBC-1 compact.awk > $@
-VSCII-2.map: ${GLIBC_CHARMAPS}/TCVN5712-1 mapconv compact.awk
+VSCII-2.map: ${GLIBC_CHARMAPS}/TCVN5712-1.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x[2-7a-f].[ ]/' GLIBC-1 compact.awk \
| sed 's/0x20-0x7F.*/0x00-0x7F 0x0000/' > $@
ALTERNATIVNYJ.map: IBM866.map
# Generating $@...
- @echo "# Modified from ibm866 according to the chart at" > $@
+ @echo "# Modified from IBM866.map according to the chart at" > $@
@echo "# http://www.cyrillic.com/ref/cyrillic/koi-8alt.html," >> $@
@echo "# with guesses for the Unicodes of the glyphs." >> $@
- @sed -e '/0xF2/ s/ .*/ 0x2019/' \
+ @sed -e '1 d' \
+ -e '/0xF2/ s/ .*/ 0x2019/' \
-e '/0xF3/ s/ .*/ 0x2018/' \
-e '/0xF4/ s/ .*/ 0x0301/' \
-e '/0xF5/ s/ .*/ 0x0300/' \
@@ -135,43 +110,43 @@ ALTERNATIVNYJ.map: IBM866.map
-e '/0xFA/ s/ .*/ 0x00B1/' \
-e '/0xFB/ s/ .*/ 0x00F7/' < $< >> $@
-MIK.map: ${MISC_CHARMAPS}/bulgarian-mik.txt.gz mapconv compact.awk
+MIK.map: mapfiles/bulgarian-mik.txt.gz mapconv compact.awk
# Generating $@...
@mapconv $< '1,$$' CZYBORRA compact.awk > $@
-PTCP154.map: ${MISC_CHARMAPS}/PTCP154 mapconv compact.awk
+PTCP154.map: mapfiles/PTCP154.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^0x/' IANA compact.awk > $@
-stdenc.map: ${MISC_CHARMAPS}/stdenc.txt mapconv compact.awk
+stdenc.map: mapfiles/stdenc.txt.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^[0-9A-Fa-f]/' UNICODE compact.awk > $@
-symbol.map: ${MISC_CHARMAPS}/symbol.txt mapconv compact.awk
+symbol.map: mapfiles/symbol.txt.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^[0-9A-Fa-f]/' UNICODE compact.awk > $@
-CP720.map: ${MISC_CHARMAPS}/720.htm mapconv compact.awk
+CP720.map: mapfiles/CP720.map.gz
# Generating $@...
- @mapconv $< '/^[0-9A-F]/' MICROSOFT compact.awk > $@
+ @zcat $< > $@
-CP858.map: ${MISC_CHARMAPS}/858.htm mapconv compact.awk
+CP858.map: mapfiles/CP858.map.gz
# Generating $@...
- @mapconv $< '/^[0-9A-F]/' MICROSOFT compact.awk > $@
+ @zcat $< > $@
-CP949-2BYTE.map: ${GLIBC_CHARMAPS}/CP949 mapconv compact.awk
+CP949-2BYTE.map: ${GLIBC_CHARMAPS}/CP949.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@
-GB2312.map: ${GLIBC_CHARMAPS}/GB2312 mapconv compact.awk
+GB2312.map: ${GLIBC_CHARMAPS}/GB2312.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@
-GBK.map: ${GLIBC_CHARMAPS}/GBK mapconv compact.awk
+GBK.map: ${GLIBC_CHARMAPS}/GBK.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@
-GB180302.map: ${GLIBC_CHARMAPS}/GB18030 mapconv gb180302.awk
+GB180302.map: ${GLIBC_CHARMAPS}/GB18030.gz mapconv gb180302.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x..\/x..[ ]/' GLIBC-2 gb180302.awk > $@
@@ -179,27 +154,27 @@ GB180304.map: GB180302.map gb180304.awk
# Generating $@...
@$(AWK) -f gb180304.awk < $< > $@
-JISX0201.map: ${GLIBC_CHARMAPS}/JIS_X0201 mapconv compact.awk
+JISX0201.map: ${GLIBC_CHARMAPS}/JIS_X0201.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x[0-9]/' GLIBC-1 compact.awk > $@
@echo "# Generated by hand" >> $@
@echo "0xA1-0xDF 0xFF61" >> $@
-JISX0208.map: ${GLIBC_CHARMAPS}/EUC-JP mapconv
+JISX0208.map: ${GLIBC_CHARMAPS}/EUC-JP.gz mapconv
# Generating $@...
@mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 \
| sed 's/0x2015/0x2014/' > $@
-JISX0212.map: ${GLIBC_CHARMAPS}/EUC-JP mapconv compact.awk
+JISX0212.map: ${GLIBC_CHARMAPS}/EUC-JP.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' GLIBC-2-7 compact.awk > $@
-JISX2131.map: ${GLIBC_CHARMAPS}/EUC-JISX0213 mapconv
+JISX2131.map: ${GLIBC_CHARMAPS}/EUC-JISX0213.gz mapconv
# Generating $@...
@mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 \
| sed -e 's/0x2015/0x2014/' -e 's/0x2299/0x29BF/' > $@
-JISX2132.map: ${GLIBC_CHARMAPS}/EUC-JISX0213 mapconv
+JISX2132.map: ${GLIBC_CHARMAPS}/EUC-JISX0213.gz mapconv
# Generating $@...
@mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' GLIBC-2-7 > $@
@@ -216,28 +191,25 @@ JISX213A.map:
echo "0x7E7D 0x7626"; \
echo "0x7E7E 0x7E6B") > $@
-CP932-2BYTE.map: ${MISC_CHARMAPS}/cp932.txt mapconv cp932.awk
+CP932-2BYTE.map: mapfiles/CP932.TXT.gz mapconv cp932.awk
# Generating $@...
@mapconv $< '/^0x[89A-F][0-9A-F][0-9A-F]/' UNICODE2 cp932.awk > $@
cp51932.el: CP932-2BYTE.map cp51932.awk
@$(AWK) -f cp51932.awk < CP932-2BYTE.map > $@
-eucjp-ms.el: ${MISC_CHARMAPS}/eucJP-13th.txt ${MISC_CHARMAPS}/eucJP-udc.txt \
- ${MISC_CHARMAPS}/eucJP-ibmext.txt eucjp-ms.awk
- @(cd ${MISC_CHARMAPS}; \
- cat eucJP-13th.txt eucJP-udc.txt eucJP-ibmext.txt) \
- | $(AWK) -f eucjp-ms.awk > $@
+eucjp-ms.el: ${GLIBC_CHARMAPS}/EUC-JP-MS.gz eucjp-ms.awk
+ @zcat $< | $(AWK) -f eucjp-ms.awk > $@
-JISC6226.map : ${MISC_CHARMAPS}/Uni2JIS mapconv kuten.awk
+JISC6226.map : mapfiles/Uni2JIS.gz mapconv kuten.awk
# Generating $@...
@mapconv $< '/^[^#].*0-/' YASUOKA kuten.awk > $@
-KSC5601.map: ${GLIBC_CHARMAPS}/EUC-KR mapconv compact.awk
+KSC5601.map: ${GLIBC_CHARMAPS}/EUC-KR.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@
-BIG5.map: ${GLIBC_CHARMAPS}/BIG5 mapconv compact.awk
+BIG5.map: ${GLIBC_CHARMAPS}/BIG5.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2 > $@
@@ -251,74 +223,74 @@ BIG5-2.map: BIG5.map mapconv big5.awk
@echo "Generated from $<" > $@
@sed -n -e '/0xc940/,$$ p' < $< | gawk -f big5.awk >> $@
-BIG5-HKSCS.map: ${GLIBC_CHARMAPS}/BIG5-HKSCS mapconv compact.awk
+BIG5-HKSCS.map: ${GLIBC_CHARMAPS}/BIG5-HKSCS.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x[89a-f].\//' GLIBC-2 compact.awk > $@
-JOHAB.map: ${GLIBC_CHARMAPS}/JOHAB mapconv compact.awk
+JOHAB.map: ${GLIBC_CHARMAPS}/JOHAB.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@
-CNS-1.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk
+CNS-1.map: ${GLIBC_CHARMAPS}/EUC-TW.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@
-# CNS-1.map: ${MISC_CHARMAPS}/cns2ucsdkw.txt mapconv compact.awk
+# CNS-1.map: mapfiles/cns2ucsdkw.txt mapconv compact.awk
# # Generating $@...
# @mapconv $< '/^C1/' KANJI-DATABASE compact.awk > $@
-CNS-2.map: ${MISC_CHARMAPS}/cns2ucsdkw.txt mapconv compact.awk
+CNS-2.map: mapfiles/cns2ucsdkw.txt.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^C2/' KANJI-DATABASE compact.awk > $@
-CNS-3.map: ${MISC_CHARMAPS}/cns2ucsdkw.txt mapconv compact.awk
+CNS-3.map: mapfiles/cns2ucsdkw.txt.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^C3/' KANJI-DATABASE compact.awk > $@
-CNS-4.map: ${MISC_CHARMAPS}/cns2ucsdkw.txt mapconv compact.awk
+CNS-4.map: mapfiles/cns2ucsdkw.txt.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^C4/' KANJI-DATABASE compact.awk > $@
-CNS-5.map: ${MISC_CHARMAPS}/cns2ucsdkw.txt mapconv compact.awk
+CNS-5.map: mapfiles/cns2ucsdkw.txt.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^C5/' KANJI-DATABASE compact.awk > $@
-CNS-6.map: ${MISC_CHARMAPS}/cns2ucsdkw.txt mapconv compact.awk
+CNS-6.map: mapfiles/cns2ucsdkw.txt.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^C6/' KANJI-DATABASE compact.awk > $@
-CNS-7.map: ${MISC_CHARMAPS}/cns2ucsdkw.txt mapconv compact.awk
+CNS-7.map: mapfiles/cns2ucsdkw.txt.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^C7/' KANJI-DATABASE compact.awk > $@
-CNS-F.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk
+CNS-F.map: ${GLIBC_CHARMAPS}/EUC-TW.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*\/x8e\/xaf/ s,/x8e/xaf,,' GLIBC-2-7 compact.awk > $@
# General target to produce map files for mule charsets.
-MULE-%.map: mule-charsets.el
+MULE-%.map: mapfiles/MULE-%.map.gz
# Generating $@...
- @${OLDEMACS} -batch -l ./mule-charsets.el $@
+ @zcat $< > $@
# General target to produce map files for ISO-8859, GEORGIAN, and
# EBCDIC charsets. We can not use the original file name because of
# file name limit on DOS. "KA" is ISO 639 language code for Georgian.
-8859-%.map: ${GLIBC_CHARMAPS}/ISO-8859-% mapconv compact.awk
+8859-%.map: ${GLIBC_CHARMAPS}/ISO-8859-%.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@
-KA-%.map: ${GLIBC_CHARMAPS}/GEORGIAN-% mapconv compact.awk
+KA-%.map: ${GLIBC_CHARMAPS}/GEORGIAN-%.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@
-EBCDIC%.map: ${GLIBC_CHARMAPS}/EBCDIC-% mapconv compact.awk
+EBCDIC%.map: ${GLIBC_CHARMAPS}/EBCDIC-%.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@
# General target to produce map files for single-byte charsets.
-%.map: ${GLIBC_CHARMAPS}/% mapconv compact.awk
+%.map: ${GLIBC_CHARMAPS}/%.gz mapconv compact.awk
# Generating $@...
@mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@