mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-1896 Add dynamic locale list creation.
X-SVN-Rev: 8596
This commit is contained in:
parent
ae2613dad4
commit
f6f63e43c0
3 changed files with 60 additions and 19 deletions
|
@ -150,8 +150,9 @@ TEST_CNV_FILES=$(TEST_UCM_SOURCE:%.ucm=$(TESTOUTDIR)/%.cnv)
|
|||
## RES files
|
||||
include $(LOCSRCDIR)/resfiles.mk
|
||||
-include $(LOCSRCDIR)/reslocal.mk
|
||||
RES_SOURCE= $(GENRB_SOURCE) $(RESOURCE_SRC) $(GENRB_SOURCE_LOCAL)
|
||||
RES_SOURCE= $(GENRB_SOURCE) $(GENRB_ALIAS_SOURCE) $(GENRB_SOURCE_LOCAL)
|
||||
RES_SRC_FILES = $(RES_SOURCE:%=$(LOCSRCDIR)/%)
|
||||
INSTALLED_RB_FILES = $(GENRB_SOURCE:%.txt=%,) $(GENRB_SOURCE_LOCAL:%.txt=%,)
|
||||
|
||||
## TRNS files
|
||||
include $(TRNSSRCDIR)/trnsfiles.mk
|
||||
|
@ -165,8 +166,11 @@ RES_FILES = $(ALL_RES_SOURCE:%.txt=$(BUILDDIR)/%.res)
|
|||
TEST_RES = casing.txt root.txt te.txt te_IN.txt testtypes.txt testempty.txt DataDrivenCollationTest.txt
|
||||
TEST_RES_FILES=$(TEST_RES:%.txt=$(TESTBUILDDIR)/%.res)
|
||||
|
||||
INDEX_FILES=$(BUILDDIR)/res_index.txt
|
||||
INDEX_RES_FILES=$(INDEX_FILES:%.txt=%.res)
|
||||
|
||||
## All generated files
|
||||
ALL_FILES = $(DAT_FILES) $(BRK_FILES) $(CNV_FILES) $(RES_FILES)
|
||||
ALL_FILES = $(DAT_FILES) $(BRK_FILES) $(CNV_FILES) $(RES_FILES) $(INDEX_RES_FILES)
|
||||
|
||||
ALL_TEST_FILES = $(TEST_DAT_FILES) $(TEST_BRK_FILES) $(TEST_CNV_FILES) $(TEST_RES_FILES) $(TESTOUTDIR)/testudata_nam.typ
|
||||
|
||||
|
@ -271,7 +275,7 @@ $(TESTBUILDDIR)/%.res: $(TESTSRCDATADIR)/%.txt $(TOOLDIR)/genrb/genrb$(EXEEXT)
|
|||
ICU_DATA=$(BUILDDIR) $(INVOKE) $(TOOLDIR)/genrb/genrb -q -s $(TESTSRCDATADIR) -d $(TESTBUILDDIR) $(<F)
|
||||
|
||||
$(TESTBUILDDIR)/ja_data.res: $(TESTSRCDATADIR)/ja_data.bin $(TOOLDIR)/genrb/genrb$(EXEEXT)
|
||||
ICU_DATA=$(BUILDDIR) $(INVOKE) $(TOOLDIR)/genrb/genrb -q -s $(TESTSRCDATADIR) -eISO_2022_JP -d $(TESTBUILDDIR) $(<F) >/dev/null
|
||||
ICU_DATA=$(BUILDDIR) $(INVOKE) $(TOOLDIR)/genrb/genrb -q -s $(TESTSRCDATADIR) -eISO_2022_JP -d $(TESTBUILDDIR) $(<F) >/dev/null
|
||||
|
||||
|
||||
|
||||
|
@ -281,6 +285,21 @@ $(BUILDDIR)/%.res: $(LOCSRCDIR)/%.txt $(TOOLDIR)/genrb/genrb$(EXEEXT) $(BUILDDIR
|
|||
$(BUILDDIR)/%.res: $(TRNSSRCDIR)/%.txt $(TOOLDIR)/genrb/genrb$(EXEEXT)
|
||||
ICU_DATA=$(BUILDDIR) $(INVOKE) $(TOOLDIR)/genrb/genrb -q -s $(TRNSSRCDIR) -d $(BUILDDIR) $(<F)
|
||||
|
||||
$(BUILDDIR)/res_index.txt: $(SRCLISTDEPS)
|
||||
@echo "generating $@ (list of installed locales)"; \
|
||||
$(RMV) $@; \
|
||||
echo "// Warning this file is automatically generated" > $@; \
|
||||
echo "res_index {" >> $@; \
|
||||
echo " InstalledLocales:array {" >> $@; \
|
||||
for file in $(INSTALLED_RB_FILES); do \
|
||||
echo " $$file" >> $@; \
|
||||
done; \
|
||||
echo " }" >> $@; \
|
||||
echo "}" >> $@;
|
||||
|
||||
$(BUILDDIR)/%.res: $(INDEX_FILES) $(TOOLDIR)/genrb/genrb$(EXEEXT)
|
||||
ICU_DATA=$(BUILDDIR) $(INVOKE) $(TOOLDIR)/genrb/genrb -d $(BUILDDIR) $?
|
||||
|
||||
################################################################### TYP
|
||||
# TYP FILES
|
||||
|
||||
|
|
|
@ -7,23 +7,33 @@
|
|||
#
|
||||
# Instead of changing this file [unless you want to check it back in],
|
||||
# you should consider creating a 'reslocal.mk' file in this same directory.
|
||||
# Then, you can have your local changes remain even if you upgrade or re
|
||||
# configure the ICU.
|
||||
# Then, you can have your local changes remain even if you upgrade or re-
|
||||
# configure ICU.
|
||||
#
|
||||
# Example 'reslocal.mk' files:
|
||||
#
|
||||
# * To add an additional converter to the list:
|
||||
# * To add an additional locale to the list:
|
||||
# _____________________________________________________
|
||||
# | GENRB_SOURCE_LOCAL = myLocale.txt ...
|
||||
#
|
||||
# * To REPLACE the default list and only build with a few
|
||||
# converters:
|
||||
# locale:
|
||||
# _____________________________________________________
|
||||
# | GENRB_SOURCE = root.txt index.txt ar.txt ar_AE.txt
|
||||
#
|
||||
#
|
||||
|
||||
GENRB_SOURCE = root.txt index.txt\
|
||||
|
||||
# This is the list of locales that are built, but not considered installed in ICU.
|
||||
# These are usually aliased locales or the root locale.
|
||||
GENRB_ALIAS_SOURCE = root.txt\
|
||||
iw.txt iw_IL.txt\
|
||||
no.txt no_NO.txt no_NO_NY.txt\
|
||||
en_AS.txt en_GU.txt en_MH.txt en_MP.txt en_UM.txt
|
||||
|
||||
|
||||
# Please try to keep this list in alphabetical order
|
||||
GENRB_SOURCE = \
|
||||
af.txt af_ZA.txt\
|
||||
am.txt am_ET.txt\
|
||||
ar.txt ar_AE.txt ar_BH.txt ar_DZ.txt ar_EG.txt\
|
||||
|
@ -39,9 +49,9 @@ da.txt da_DK.txt\
|
|||
de.txt de__PHONEBOOK.txt de_AT.txt de_AT_PREEURO.txt de_BE.txt de_CH.txt\
|
||||
de_DE.txt de_DE_PREEURO.txt de_LU.txt de_LU_PREEURO.txt de_LI.txt div.txt div_MV.txt\
|
||||
el.txt el_GR.txt el_GR_PREEURO.txt\
|
||||
en.txt en_AS.txt en_AU.txt en_BE.txt en_BE_PREEURO.txt en_BW.txt en_BZ.txt en_CA.txt en_GB.txt en_GB_EURO.txt\
|
||||
en_GU.txt en_HK.txt en_IE.txt en_IE_PREEURO.txt en_IN.txt en_JM.txt en_MH.txt en_MP.txt en_NZ.txt en_PH.txt en_SG.txt en_MT.txt\
|
||||
en_TT.txt en_UM.txt en_US.txt en_US_POSIX.txt en_VI.txt en_ZA.txt en_ZW.txt\
|
||||
en.txt en_AU.txt en_BE.txt en_BE_PREEURO.txt en_BW.txt en_BZ.txt en_CA.txt en_GB.txt en_GB_EURO.txt\
|
||||
en_HK.txt en_IE.txt en_IE_PREEURO.txt en_IN.txt en_JM.txt en_NZ.txt en_PH.txt en_SG.txt en_MT.txt\
|
||||
en_TT.txt en_US.txt en_US_POSIX.txt en_VI.txt en_ZA.txt en_ZW.txt\
|
||||
eo.txt\
|
||||
es.txt es__TRADITIONAL.txt es_AR.txt es_BO.txt es_CL.txt es_CO.txt\
|
||||
es_CR.txt es_DO.txt es_EC.txt es_ES.txt es_ES_PREEURO.txt\
|
||||
|
@ -67,7 +77,6 @@ hy.txt hy_AM.txt hy_AM_REVISED.txt\
|
|||
id.txt id_ID.txt\
|
||||
is.txt is_IS.txt\
|
||||
it.txt it_CH.txt it_IT.txt it_IT_PREEURO.txt\
|
||||
iw.txt iw_IL.txt\
|
||||
ja.txt ja_JP.txt\
|
||||
ka.txt ka_GE.txt\
|
||||
kk.txt kk_KZ.txt\
|
||||
|
@ -87,7 +96,6 @@ ms.txt ms_MY.txt ms_BN.txt\
|
|||
nb.txt nb_NO.txt\
|
||||
nl.txt nl_BE.txt nl_BE_PREEURO.txt nl_NL.txt nl_NL_PREEURO.txt\
|
||||
nn.txt nn_NO.txt\
|
||||
no.txt no_NO.txt no_NO_NY.txt\
|
||||
om.txt om_ET.txt om_KE.txt\
|
||||
pa.txt pa_IN.txt\
|
||||
pl.txt pl_PL.txt\
|
||||
|
|
|
@ -184,7 +184,10 @@ GENRB_SOURCE=$(GENRB_SOURCE) $(GENRB_SOURCE_LOCAL)
|
|||
!ERROR ERROR: cannot find "resfiles.mk"
|
||||
!ENDIF
|
||||
|
||||
RB_FILES = $(GENRB_SOURCE:.txt=.res)
|
||||
RB_FILES = $(GENRB_ALIAS_SOURCE:.txt=.res) $(GENRB_SOURCE:.txt=.res)
|
||||
|
||||
# The installed locales don't have aliased locales
|
||||
INSTALLED_RB_FILES = $(GENRB_SOURCE:.txt=,) $(GENRB_SOURCE_LOCAL:.txt=,)
|
||||
|
||||
# Read list of transliterator resource bundle files
|
||||
!IF EXISTS("$(ICUSRCDATA)\$(ICUTRNS)\trnsfiles.mk")
|
||||
|
@ -201,6 +204,8 @@ TRANLIT_SOURCE=$(TRANSLIT_SOURCE) $(TRANSLIT_SOURCE_LOCAL)
|
|||
|
||||
TRANSLIT_FILES = $(TRANSLIT_SOURCE:.txt=.res)
|
||||
|
||||
INDEX_RES_FILES = res_index.res
|
||||
|
||||
ALL_RES = $(RB_FILES) $(TRANSLIT_FILES)
|
||||
|
||||
#############################################################################
|
||||
|
@ -243,9 +248,9 @@ ucadata.dat
|
|||
invuca.dat
|
||||
$(CNV_FILES:.cnv =.cnv
|
||||
)
|
||||
$(RB_FILES:.res =.res
|
||||
$(ALL_RES:.res =.res
|
||||
)
|
||||
$(TRANSLIT_FILES:.res =.res
|
||||
$(INDEX_RES_FILES:.res =.res
|
||||
)
|
||||
$(BRK_FILES:.brk" =.brk"
|
||||
)
|
||||
|
@ -294,9 +299,9 @@ CLEAN : GODATA
|
|||
-@erase "*.brk"
|
||||
-@erase "*.cnv"
|
||||
-@erase "*.dat"
|
||||
-@erase "*.exp"
|
||||
-@erase "*.exp"
|
||||
-@erase "*.obj"
|
||||
-@erase "*.lib"
|
||||
-@erase "*.lib"
|
||||
-@erase "*.mak"
|
||||
-@erase "*.res"
|
||||
-@erase "*.txt"
|
||||
|
@ -342,8 +347,17 @@ CLEAN : GODATA
|
|||
|
||||
# Inference rule for creating resource bundle files
|
||||
{$(ICUSRCDATA_RELATIVE_PATH)\$(ICULOC)}.txt.res::
|
||||
@echo Generating <<res_index.txt
|
||||
// Warning this file is automatically generated
|
||||
res_index {
|
||||
InstalledLocales:array {
|
||||
$(INSTALLED_RB_FILES:, =,
|
||||
)
|
||||
}
|
||||
}
|
||||
<<KEEP
|
||||
@echo Making Locale Resource Bundle files
|
||||
@"$(ICUTOOLS)\genrb\$(CFG)\genrb" -d"$(ICUBLD)" $<
|
||||
@"$(ICUTOOLS)\genrb\$(CFG)\genrb" -d"$(ICUBLD)" .\res_index.txt $<
|
||||
|
||||
# DLL version information
|
||||
"$(ICUBLD)\icudata.res": "$(ICUMISC)\icudata.rc"
|
||||
|
|
Loading…
Add table
Reference in a new issue