ICU-4351 Make it easier to customize the data.

X-SVN-Rev: 17807
This commit is contained in:
George Rhoten 2005-06-06 01:23:13 +00:00
parent dcd6db9b35
commit 90ca96a8fa
2 changed files with 32 additions and 18 deletions

View File

@ -232,19 +232,26 @@ CNV_FILES_SHORT = $(ALL_UCM_SOURCE:%.ucm=%.cnv)
-include $(COLSRCDIR)/collocal.mk
-include $(RBNFSRCDIR)/rbnflocal.mk
-include $(TRANSLITSRCDIR)/translocal.mk
ifdef GENRB_SOURCE
RES_SRC= root.txt $(GENRB_SOURCE) $(GENRB_ALIAS_SOURCE) $(GENRB_SOURCE_LOCAL)
RES_SRC_FILES = $(RES_SRC:%=$(LOCSRCDIR)/%)
INSTALLED_RB_FILES = $(GENRB_SOURCE:%.txt=%) $(GENRB_SOURCE_LOCAL:%.txt=%)
endif
ifdef COLLATION_SOURCE
COL_SRC= root.txt $(COLLATION_SOURCE) $(COLLATION_ALIAS_SOURCE) $(COLLATION_SOURCE_LOCAL)
COL_SRC_FILES = $(COL_SRC:%=$(COLSRCDIR)/%)
INSTALLED_COL_FILES = $(COLLATION_SOURCE:%.txt=%) $(COLLATION_SOURCE_LOCAL:%.txt=%)
RBNF_SRC= $(RBNF_SOURCE) $(RBNF_ALIAS_SOURCE) $(RBNF_SOURCE_LOCAL)
endif
ifdef RBNF_SOURCE
RBNF_SRC= root.txt $(RBNF_SOURCE) $(RBNF_ALIAS_SOURCE) $(RBNF_SOURCE_LOCAL)
RBNF_SRC_FILES = $(RBNF_SRC:%=$(RBNFSRCDIR)/%)
INSTALLED_RBNF_FILES = $(RBNF_SOURCE:%.txt=%) $(RBNF_SOURCE_LOCAL:%.txt=%)
INSTALLED_TRANSLIT_FILES = $(TRANSLIT_SOURCE:%.txt=%) $(TRANSLIT_SOURCE_LOCAL:%.txt=%)
endif
ifdef TRANSLIT_SOURCE
TRANSLIT_SRC= $(TRANSLIT_SOURCE) $(TRANSLIT_ALIAS_SOURCE) $(TRANSLIT_SOURCE_LOCAL)
TRANSLIT_SRC_FILES = $(TRANSLIT_SRC:%=$(TRANSLITSRCDIR)/%)
INSTALLED_TRANSLIT_FILES = $(TRANSLIT_SOURCE:%.txt=%) $(TRANSLIT_SOURCE_LOCAL:%.txt=%)
endif
GENRBOPTS=-k
## MISC files

View File

@ -223,7 +223,11 @@ GENRB_SOURCE=$(GENRB_SOURCE) $(GENRB_SOURCE_LOCAL)
!MESSAGE Warning: cannot find "resfiles.mk"
!ENDIF
!IFDEF GENRB_SOURCE
RB_FILES = root.res $(GENRB_ALIAS_SOURCE:.txt=.res) $(GENRB_SOURCE:.txt=.res)
ALL_RES = $(ALL_RES) res_index.res
!ENDIF
# Read list of locale resource bundle files
!IF EXISTS("$(ICUSRCDATA)\$(ICUCOL)\colfiles.mk")
@ -238,10 +242,13 @@ COLLATION_SOURCE=$(COLLATION_SOURCE) $(COLLATION_SOURCE_LOCAL)
!MESSAGE Warning: cannot find "colfiles.mk"
!ENDIF
!IFDEF COLLATION_SOURCE
COL_FILES = $(ICUCOL)\root.txt $(COLLATION_ALIAS_SOURCE) $(COLLATION_SOURCE)
COL_COL_FILES = $(COL_FILES:.txt =.res coll\)
COL_COL_FILES = $(COL_COL_FILES:.txt=.res)
COL_COL_FILES = $(COL_COL_FILES:coll\ =)
ALL_RES = $(ALL_RES) $(ICUCOL)\res_index.res
!ENDIF
# Read list of RBNF resource bundle files
!IF EXISTS("$(ICUSRCDATA)\$(ICURBNF)\rbnffiles.mk")
@ -256,10 +263,13 @@ RBNF_SOURCE=$(RBNF_SOURCE) $(RBNF_SOURCE_LOCAL)
!MESSAGE Warning: cannot find "rbnffiles.mk"
!ENDIF
RBNF_FILES = $(RBNF_ALIAS_SOURCE) $(RBNF_SOURCE)
!IFDEF RBNF_SOURCE
RBNF_FILES = $(ICURBNF)\root.txt $(RBNF_ALIAS_SOURCE) $(RBNF_SOURCE)
RBNF_RES_FILES = $(RBNF_FILES:.txt =.res rbnf\)
RBNF_RES_FILES = $(RBNF_RES_FILES:.txt=.res)
#RBNF_RES_FILES = $(RBNF_RES_FILES:rbnf\ =rbnf\)
RBNF_RES_FILES = $(RBNF_RES_FILES:rbnf\ =rbnf\)
ALL_RES = $(ALL_RES) $(ICURBNF)\res_index.res
!ENDIF
# Read list of transliterator resource bundle files
!IF EXISTS("$(ICUSRCDATA)\$(ICUTRNS)\trnsfiles.mk")
@ -274,10 +284,13 @@ TRANSLIT_SOURCE=$(TRANSLIT_SOURCE) $(TRANSLIT_SOURCE_LOCAL)
!MESSAGE Warning: cannot find "trnsfiles.mk"
!ENDIF
TRANSLIT_FILES = $(TRANSLIT_ALIAS_SOURCE) $(TRANSLIT_SOURCE)
!IFDEF TRANSLIT_SOURCE
TRANSLIT_FILES = $(ICUTRNS)\$(TRANSLIT_ALIAS_SOURCE) $(TRANSLIT_SOURCE)
TRANSLIT_RES_FILES = $(TRANSLIT_FILES:.txt =.res translit\)
TRANSLIT_RES_FILES = $(TRANSLIT_RES_FILES:.txt=.res)
#TRANSLIT_RES_FILES = $(TRANSLIT_RES_FILES:translit\ =translit\)
TRANSLIT_RES_FILES = $(TRANSLIT_RES_FILES:translit\ =translit\)
#ALL_RES = $(ALL_RES) $(ICUTRNS)\res_index.res
!ENDIF
# Read list of miscellaneous resource bundle files
!IF EXISTS("$(ICUSRCDATA)\$(ICUMISC2)\miscfiles.mk")
@ -294,13 +307,8 @@ MISC_SOURCE=$(MISC_SOURCE) $(MISC_SOURCE_LOCAL)
MISC_FILES = $(MISC_SOURCE:.txt=.res)
INDEX_RES_FILES = res_index.res
INDEX_COL_FILES = $(ICUCOL)\res_index.res
INDEX_RBNF_FILES = $(ICURBNF)\res_index.res
#INDEX_TRANSLIT_FILES = $(ICUTRNS)\res_index.res
# don't include COL_FILES
ALL_RES = $(INDEX_RES_FILES) $(RB_FILES) $(MISC_FILES)
ALL_RES = $(ALL_RES) $(RB_FILES) $(MISC_FILES)
# Common defines for both ways of building ICU's data library.
COMMON_ICUDATA_DEPENDENCIES="$(ICUP)\bin\pkgdata.exe" "$(ICUTMP)\icudata.res" "$(ICUP)\source\stubdata\stubdatabuilt.txt"
@ -355,7 +363,7 @@ uni-core-data: GODATA "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(IC
copy "$(ICUPKG).dat" "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat"
-@erase "$(ICUPKG).dat"
!ELSE
"$(DLL_OUTPUT)\$(U_ICUDATA_NAME).dll" : $(COMMON_ICUDATA_DEPENDENCIES) $(CNV_FILES) "$(ICUBLD_PKG)\unames.icu" "$(ICUBLD_PKG)\pnames.icu" "$(ICUBLD_PKG)\cnvalias.icu" "$(ICUBLD_PKG)\ucadata.icu" "$(ICUBLD_PKG)\invuca.icu" "$(ICUBLD_PKG)\uidna.spp" $(BRK_FILES) $(INDEX_COL_FILES) $(COL_COL_FILES) $(INDEX_RBNF_FILES) $(RBNF_RES_FILES) $(TRANSLIT_RES_FILES) $(ALL_RES)
"$(DLL_OUTPUT)\$(U_ICUDATA_NAME).dll" : $(COMMON_ICUDATA_DEPENDENCIES) $(CNV_FILES) "$(ICUBLD_PKG)\unames.icu" "$(ICUBLD_PKG)\pnames.icu" "$(ICUBLD_PKG)\cnvalias.icu" "$(ICUBLD_PKG)\ucadata.icu" "$(ICUBLD_PKG)\invuca.icu" "$(ICUBLD_PKG)\uidna.spp" $(BRK_FILES) $(COL_COL_FILES) $(RBNF_RES_FILES) $(TRANSLIT_RES_FILES) $(ALL_RES)
@echo Building icu data
cd "$(ICUBLD_PKG)"
@"$(ICUP)\bin\pkgdata" $(COMMON_ICUDATA_ARGUMENTS) <<"$(ICUTMP)\pkgdatain.txt"
@ -371,10 +379,8 @@ $(ALL_RES:.res =.res
)
$(COL_COL_FILES:.res =.res
)
$(ICUCOL)\res_index.res
$(RBNF_RES_FILES:.res =.res
)
$(ICURBNF)\res_index.res
$(TRANSLIT_RES_FILES:.res =.res
)
$(BRK_FILES:.brk =.brk
@ -462,7 +468,7 @@ CLEAN : GODATA
@echo Making Locale Resource Bundle files
@"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -d"$(ICUBLD_PKG)" $<
$(INDEX_RES_FILES):
res_index.res:
@echo Generating <<res_index.txt
// Warning this file is automatically generated
res_index {
@ -478,7 +484,7 @@ res_index {
@echo Making Collation files
@"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICUCOL)" $<
$(INDEX_COL_FILES):
$(ICUCOL)\res_index.res:
@echo Generating <<$(ICUCOL)\res_index.txt
// Warning this file is automatically generated
res_index {
@ -494,7 +500,7 @@ res_index {
@echo Making RBNF files
@"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICURBNF)" $<
$(INDEX_RBNF_FILES):
$(ICURBNF)\res_index.res:
@echo Generating <<$(ICURBNF)\res_index.txt
// Warning this file is automatically generated
res_index {
@ -508,6 +514,7 @@ res_index {
{$(ICUSRCDATA_RELATIVE_PATH)\$(ICUTRNS)}.txt{$(ICUTRNS)}.res::
@echo Making Transliterator files
@echo $(TRANSLIT_RES_FILES)
@"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICUTRNS)" $<