From 3e67d5f38b9246d4be1f872e551a373c78efb3c4 Mon Sep 17 00:00:00 2001 From: John Marino Date: Mon, 3 Aug 2015 02:51:51 +0200 Subject: [PATCH] cldr2def: Update Makefile to generate new POSIX source files We've been using CLDR v2.0.1 because it was the last version that provided generated POSIX source files. (The next release, v21, only provided the java tool to generate them). The last release is version 27.0.1. This alternation to the makefile allows the generation of the desired 72 base locales with a single command (after the tool is downloaded and installed in the same CLDR release directory) Note that kk_KZ locale is changing to kk_Cyrl_KZ. While here, make the necessary updates to charmaps.xml to generate to locale source files. --- tools/tools/locale/Makefile | 35 ++++++++++++++++++++++++++++ tools/tools/locale/etc/charmaps.xml | 20 ++++++++++++++-- tools/tools/locale/etc/unicode.conf | 4 ++-- tools/tools/locale/tools/cldr2def.pl | 1 + 4 files changed, 56 insertions(+), 4 deletions(-) diff --git a/tools/tools/locale/Makefile b/tools/tools/locale/Makefile index e60214a1e2..d41fb917e4 100644 --- a/tools/tools/locale/Makefile +++ b/tools/tools/locale/Makefile @@ -68,3 +68,38 @@ clean: rm -rf ${t} ${t}.draft .endfor +BASE_LOCALES_OF_INTEREST?= \ + af_ZA am_ET be_BY bg_BG ca_AD ca_ES ca_FR ca_IT \ + cs_CZ da_DK de_AT de_CH de_DE el_GR en_AU en_CA \ + en_GB en_HK en_IE en_NZ en_PH en_SG en_US en_ZA \ + es_AR es_CR es_ES es_MX et_EE eu_ES fi_FI fr_BE \ + fr_CA fr_CH fr_FR he_IL hi_IN hr_HR hu_HU hy_AM \ + is_IS it_CH it_IT ja_JP ko_KR lt_LT lv_LV \ + nb_NO nl_BE nl_NL nn_NO pl_PL pt_BR pt_PT ro_RO \ + ru_RU se_FI se_NO sk_SK sl_SI sv_FI sv_SE tr_TR \ + uk_UA \ + kk_Cyrl_KZ mn_Cyrl_MN sr_Cyrl_RS sr_Latn_RS \ + zh_Hans_CN zh_Hant_HK zh_Hant_TW + +POSIX: +.if exists (${CLDRDIR}/tools/java/cldr.jar) + mkdir -p ${CLDRDIR}/posix +. for area in ${BASE_LOCALES_OF_INTEREST} +. if !exists(${CLDRDIR}/posix/${area}.UTF-8.src) + java -DCLDR_DIR=${CLDRDIR:Q} -jar ${CLDRDIR}/tools/java/cldr.jar \ + org.unicode.cldr.posix.GeneratePOSIX \ + -d ${CLDRDIR}/posix -m ${area} -c UTF-8 +. endif +. endfor +. if !exists(${CLDRDIR}/posix/UTF-8.cm) + java -DCLDR_DIR=${CLDRDIR:Q} -jar ${CLDRDIR}/tools/java/cldr.jar \ + org.unicode.cldr.posix.GenerateCharmap \ + -d ${CLDRDIR}/posix +. endif +.else + @echo "Please install CLDR toolset for the desired release" + @echo "It should go at ${CLDRDIR}/tools" +.endif + +clean-POSIX: + rm -f {CLDRDIR}/posix/* diff --git a/tools/tools/locale/etc/charmaps.xml b/tools/tools/locale/etc/charmaps.xml index 6f2d1a25fa..0265bf4a66 100644 --- a/tools/tools/locale/etc/charmaps.xml +++ b/tools/tools/locale/etc/charmaps.xml @@ -104,6 +104,7 @@ encoding="SJIS eucJP" countries="JP" /> + + - @@ -427,22 +430,32 @@ unicode="FULLWIDTH DOLLAR SIGN" /> + + + + + @@ -546,7 +559,10 @@ - + + diff --git a/tools/tools/locale/etc/unicode.conf b/tools/tools/locale/etc/unicode.conf index 00edeb1344..da1f19b931 100644 --- a/tools/tools/locale/etc/unicode.conf +++ b/tools/tools/locale/etc/unicode.conf @@ -1,2 +1,2 @@ -cldr ~/unicode/cldr/2.0.1 -unidata ~/unicode/UNIDATA/27.01 +cldr ~/unicode/cldr/27.0.1 +unidata ~/unicode/UNIDATA/8.0.0 diff --git a/tools/tools/locale/tools/cldr2def.pl b/tools/tools/locale/tools/cldr2def.pl index 9aa26664fa..3be828c1e0 100755 --- a/tools/tools/locale/tools/cldr2def.pl +++ b/tools/tools/locale/tools/cldr2def.pl @@ -790,6 +790,7 @@ sub make_makefile { else { $SRCOUT = "grep -v -E '^(\#\$\$|\#[ ])' < \${.IMPSRC} > \${.TARGET}"; $SRCOUT2 = "out"; + $MAPLOC = ""; } open(FOUT, ">$TYPE.draft/Makefile"); print FOUT <