michael@0: #********************************************************************** michael@0: #* Copyright (C) 1999-2013, International Business Machines Corporation michael@0: #* and others. All Rights Reserved. michael@0: #********************************************************************** michael@0: # nmake file for creating data files on win32 michael@0: # invoke with michael@0: # nmake /f makedata.mak icumake=$(ProjectDir) michael@0: # michael@0: # 12/10/1999 weiv Created michael@0: michael@0: ############################################################################## michael@0: # Keep the following in sync with the version - see common/unicode/uvernum.h michael@0: U_ICUDATA_NAME=icudt52 michael@0: ############################################################################## michael@0: U_ICUDATA_ENDIAN_SUFFIX=l michael@0: UNICODE_VERSION=6.3 michael@0: ICU_LIB_TARGET=$(DLL_OUTPUT)\$(U_ICUDATA_NAME).dll michael@0: michael@0: # ICUMAKE michael@0: # Must be provided by whoever runs this makefile. michael@0: # Is the directory containing this file (makedata.mak) michael@0: # Is the directory into which most data is built (prior to packaging) michael@0: # Is icu\source\data\ michael@0: # michael@0: !IF "$(ICUMAKE)"=="" michael@0: !ERROR Can't find ICUMAKE (ICU Data Make dir, should point to icu\source\data\ )! michael@0: !ENDIF michael@0: !MESSAGE ICU data make path is $(ICUMAKE) michael@0: michael@0: # Suffixes for data files michael@0: .SUFFIXES : .nrm .icu .ucm .cnv .dll .dat .res .txt .c michael@0: michael@0: ICUOUT=$(ICUMAKE)\out michael@0: michael@0: # the prefix "icudt21_" for use in filenames michael@0: ICUPKG=$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX) michael@0: michael@0: # need to nuke \\ for .NET... michael@0: ICUOUT=$(ICUOUT:\\=\) michael@0: michael@0: ICUBLD=$(ICUOUT)\build michael@0: ICUBLD_PKG=$(ICUBLD)\$(ICUPKG) michael@0: ICUTMP=$(ICUOUT)\tmp michael@0: michael@0: # ICUP michael@0: # The root of the ICU source directory tree michael@0: # michael@0: ICUP=$(ICUMAKE)\..\.. michael@0: ICUP=$(ICUP:\source\data\..\..=) michael@0: # In case the first one didn't do it, try this one. .NET would do the second one. michael@0: ICUP=$(ICUP:\source\data\\..\..=) michael@0: !MESSAGE ICU root path is $(ICUP) michael@0: michael@0: michael@0: # ICUSRCDATA michael@0: # The data directory in source michael@0: # michael@0: ICUSRCDATA=$(ICUP)\source\data michael@0: ICUSRCDATA_RELATIVE_PATH=..\..\.. michael@0: michael@0: # ICUUCM michael@0: # The directory that contains ucmcore.mk files along with *.ucm files michael@0: # michael@0: ICUUCM=mappings michael@0: michael@0: # ICULOC michael@0: # The directory that contains resfiles.mk files along with *.txt locale data files michael@0: # michael@0: ICULOC=locales michael@0: michael@0: # ICUCOL michael@0: # The directory that contains colfiles.mk files along with *.txt collation data files michael@0: # michael@0: ICUCOL=coll michael@0: michael@0: # ICURBNF michael@0: # The directory that contains rbnffiles.mk files along with *.txt RBNF data files michael@0: # michael@0: ICURBNF=rbnf michael@0: michael@0: # ICUTRNS michael@0: # The directory that contains trfiles.mk files along with *.txt transliterator files michael@0: # michael@0: ICUTRNS=translit michael@0: michael@0: # ICUBRK michael@0: # The directory that contains resfiles.mk files along with *.txt break iterator files michael@0: # michael@0: ICUBRK=brkitr michael@0: michael@0: # ICUUNIDATA michael@0: # The directory that contains Unicode data files michael@0: # michael@0: ICUUNIDATA=$(ICUP)\source\data\unidata michael@0: michael@0: michael@0: # ICUMISC michael@0: # The directory that contains miscfiles.mk along with files that are miscelleneous data michael@0: # michael@0: ICUMISC=$(ICUP)\source\data\misc michael@0: ICUMISC2=misc michael@0: michael@0: # ICUSPREP michael@0: # The directory that contains sprepfiles.mk files along with *.txt stringprep files michael@0: # michael@0: ICUSPREP=sprep michael@0: michael@0: # michael@0: # ICUDATA michael@0: # The source directory. Contains the source files for the common data to be built. michael@0: # WARNING: NOT THE SAME AS ICU_DATA environment variable. Confusing. michael@0: ICUDATA=$(ICUP)\source\data michael@0: michael@0: # michael@0: # DLL_OUTPUT michael@0: # Destination directory for the common data DLL file. michael@0: # This is the same place that all of the other ICU DLLs go (the code-containing DLLs) michael@0: # The lib file for the data DLL goes in $(DLL_OUTPUT)/../lib/ michael@0: # michael@0: !IF "$(CFG)" == "x64\Release" || "$(CFG)" == "x64\Debug" michael@0: DLL_OUTPUT=$(ICUP)\bin64 michael@0: !ELSE michael@0: DLL_OUTPUT=$(ICUP)\bin michael@0: !ENDIF michael@0: michael@0: # michael@0: # TESTDATA michael@0: # The source directory for data needed for test programs. michael@0: TESTDATA=$(ICUP)\source\test\testdata michael@0: michael@0: # michael@0: # TESTDATAOUT michael@0: # The destination directory for the built test data .dat file michael@0: TESTDATAOUT=$(ICUP)\source\test\testdata\out michael@0: michael@0: # michael@0: # TESTDATABLD michael@0: # The build directory for test data intermidiate files michael@0: # (Tests are NOT run from this makefile, michael@0: # only the data is put in place.) michael@0: TESTDATABLD=$(ICUP)\source\test\testdata\out\build michael@0: michael@0: # michael@0: # ICUTOOLS michael@0: # Directory under which all of the ICU data building tools live. michael@0: # michael@0: ICUTOOLS=$(ICUP)\source\tools michael@0: michael@0: # The current ICU tools need to be in the path first. michael@0: !IF "$(CFG)" == "x64\Release" || "$(CFG)" == "x64\Debug" michael@0: PATH = $(ICUP)\bin64;$(PATH) michael@0: ICUPBIN=$(ICUP)\bin64 michael@0: !ELSE michael@0: PATH = $(ICUP)\bin;$(PATH) michael@0: ICUPBIN=$(ICUP)\bin michael@0: !ENDIF michael@0: michael@0: michael@0: # This variable can be overridden to "-m static" by the project settings, michael@0: # if you want a static data library. michael@0: !IF "$(ICU_PACKAGE_MODE)"=="" michael@0: ICU_PACKAGE_MODE=-m dll michael@0: !ENDIF michael@0: michael@0: # If this archive exists, build from that michael@0: # instead of building everything from scratch. michael@0: ICUDATA_SOURCE_ARCHIVE=$(ICUSRCDATA)\in\$(ICUPKG).dat michael@0: !IF !EXISTS("$(ICUDATA_SOURCE_ARCHIVE)") michael@0: # Does a big endian version exist either? michael@0: ICUDATA_ARCHIVE=$(ICUSRCDATA)\in\$(U_ICUDATA_NAME)b.dat michael@0: !IF EXISTS("$(ICUDATA_ARCHIVE)") michael@0: ICUDATA_SOURCE_ARCHIVE=$(ICUTMP)\$(ICUPKG).dat michael@0: !ELSE michael@0: # Nothing was usable for input michael@0: !UNDEF ICUDATA_SOURCE_ARCHIVE michael@0: !ENDIF michael@0: !ENDIF michael@0: michael@0: !IFDEF ICUDATA_SOURCE_ARCHIVE michael@0: !MESSAGE ICU data source archive is $(ICUDATA_SOURCE_ARCHIVE) michael@0: !ELSE michael@0: # We're including a list of .ucm files. michael@0: # There are several lists, they are all optional. michael@0: michael@0: # Always build the mapping files for the EBCDIC fallback codepages michael@0: # They are necessary on EBCDIC machines, and michael@0: # the following logic is much easier if UCM_SOURCE is never empty. michael@0: # (They are small.) michael@0: UCM_SOURCE=ibm-37_P100-1995.ucm ibm-1047_P100-1995.ucm michael@0: michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmcore.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmcore.mk" michael@0: UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_CORE) michael@0: !ELSE michael@0: !MESSAGE Warning: cannot find "ucmcore.mk". Not building core MIME/Unix/Windows converter files. michael@0: !ENDIF michael@0: michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmfiles.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmfiles.mk" michael@0: UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_FILES) michael@0: !ELSE michael@0: !MESSAGE Warning: cannot find "ucmfiles.mk". Not building many converter files. michael@0: !ENDIF michael@0: michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmebcdic.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmebcdic.mk" michael@0: UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_EBCDIC) michael@0: !IFDEF UCM_SOURCE_EBCDIC_IGNORE_SISO michael@0: BUILD_SPECIAL_CNV_FILES=YES michael@0: UCM_SOURCE_SPECIAL=$(UCM_SOURCE_EBCDIC_IGNORE_SISO) michael@0: !ELSE michael@0: !UNDEF BUILD_SPECIAL_CNV_FILES michael@0: !ENDIF michael@0: !ELSE michael@0: !MESSAGE Warning: cannot find "ucmebcdic.mk". Not building EBCDIC converter files. michael@0: !ENDIF michael@0: michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmlocal.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmlocal.mk" michael@0: UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_LOCAL) michael@0: !IFDEF UCM_SOURCE_EBCDIC_IGNORE_SISO_LOCAL michael@0: UCM_SOURCE_SPECIAL=$(UCM_SOURCE_SPECIAL) $(UCM_SOURCE_EBCDIC_IGNORE_SISO_LOCAL) michael@0: BUILD_SPECIAL_CNV_FILES=YES michael@0: !ENDIF michael@0: !ELSE michael@0: !MESSAGE Information: cannot find "ucmlocal.mk". Not building user-additional converter files. michael@0: !ENDIF michael@0: michael@0: CNV_FILES=$(UCM_SOURCE:.ucm=.cnv) michael@0: !IFDEF BUILD_SPECIAL_CNV_FILES michael@0: CNV_FILES_SPECIAL=$(UCM_SOURCE_SPECIAL:.ucm=.cnv) michael@0: !ENDIF michael@0: michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICUBRK)\brkfiles.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICUBRK)\brkfiles.mk" michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICUBRK)\brklocal.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICUBRK)\brklocal.mk" michael@0: BRK_SOURCE=$(BRK_SOURCE) $(BRK_SOURCE_LOCAL) michael@0: BRK_DICT_SOURCE=$(BRK_DICT_SOURCE) $(BRK_DICT_SOURCE_LOCAL) michael@0: BRK_RES_SOURCE=$(BRK_RES_SOURCE) $(BRK_RES_SOURCE_LOCAL) michael@0: !ELSE michael@0: !MESSAGE Information: cannot find "brklocal.mk". Not building user-additional break iterator files. michael@0: !ENDIF michael@0: !ELSE michael@0: !MESSAGE Warning: cannot find "brkfiles.mk" michael@0: !ENDIF michael@0: michael@0: # michael@0: # Break iterator data files. michael@0: # michael@0: BRK_FILES=$(ICUBRK)\$(BRK_SOURCE:.txt =.brk brkitr\) michael@0: BRK_FILES=$(BRK_FILES:.txt=.brk) michael@0: BRK_FILES=$(BRK_FILES:brkitr\ =brkitr\) michael@0: michael@0: !IFDEF BRK_DICT_SOURCE michael@0: BRK_DICT_FILES = $(ICUBRK)\$(BRK_DICT_SOURCE:.txt =.dict brkitr\) michael@0: BRK_DICT_FILES = $(BRK_DICT_FILES:.txt=.dict) michael@0: BRK_DICT_FILES = $(BRK_DICT_FILES:brkitr\ =brkitr\) michael@0: !ENDIF michael@0: michael@0: !IFDEF BRK_RES_SOURCE michael@0: BRK_RES_FILES = $(BRK_RES_SOURCE:.txt =.res brkitr\) michael@0: BRK_RES_FILES = $(BRK_RES_FILES:.txt=.res) michael@0: BRK_RES_FILES = $(ICUBRK)\root.res $(ICUBRK)\$(BRK_RES_FILES:brkitr\ =) michael@0: ALL_RES = $(ALL_RES) $(ICUBRK)\res_index.res michael@0: !ENDIF michael@0: michael@0: # Read list of locale resource bundle files michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICULOC)\resfiles.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICULOC)\resfiles.mk" michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICULOC)\reslocal.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICULOC)\reslocal.mk" michael@0: GENRB_SOURCE=$(GENRB_SOURCE) $(GENRB_SOURCE_LOCAL) michael@0: !ELSE michael@0: !MESSAGE Information: cannot find "reslocal.mk". Not building user-additional resource bundle files. michael@0: !ENDIF michael@0: !ELSE michael@0: !MESSAGE Warning: cannot find "resfiles.mk" michael@0: !ENDIF michael@0: michael@0: !IFDEF GENRB_SOURCE michael@0: RB_FILES = root.res pool.res $(GENRB_ALIAS_SOURCE:.txt=.res) $(GENRB_ALIAS_SOURCE_LOCAL:.txt=.res) $(GENRB_SOURCE:.txt=.res) michael@0: ALL_RES = $(ALL_RES) res_index.res michael@0: !ENDIF michael@0: michael@0: michael@0: # Read the list of currency display name resource bundle files michael@0: !IF EXISTS("$(ICUSRCDATA)\curr\resfiles.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\curr\resfiles.mk" michael@0: !IF EXISTS("$(ICUSRCDATA)\curr\reslocal.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\curr\reslocal.mk" michael@0: CURR_SOURCE=$(CURR_SOURCE) $(CURR_SOURCE_LOCAL) michael@0: !ELSE michael@0: !MESSAGE Information: cannot find "curr\reslocal.mk". Not building user-additional resource bundle files. michael@0: !ENDIF michael@0: !ELSE michael@0: !MESSAGE Warning: cannot find "curr\resfiles.mk" michael@0: !ENDIF michael@0: michael@0: !IFDEF CURR_SOURCE michael@0: CURR_FILES = curr\root.txt supplementalData.txt $(CURR_ALIAS_SOURCE) $(CURR_SOURCE) michael@0: CURR_RES_FILES = $(CURR_FILES:.txt =.res curr\) michael@0: CURR_RES_FILES = $(CURR_RES_FILES:.txt=.res) michael@0: CURR_RES_FILES = curr\pool.res $(CURR_RES_FILES:curr\ =curr\) michael@0: ALL_RES = $(ALL_RES) curr\res_index.res michael@0: !ENDIF michael@0: michael@0: # Read the list of language/script display name resource bundle files michael@0: !IF EXISTS("$(ICUSRCDATA)\lang\resfiles.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\lang\resfiles.mk" michael@0: !IF EXISTS("$(ICUSRCDATA)\lang\reslocal.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\lang\reslocal.mk" michael@0: LANG_SOURCE=$(LANG_SOURCE) $(LANG_SOURCE_LOCAL) michael@0: !ELSE michael@0: !MESSAGE Information: cannot find "lang\reslocal.mk". Not building user-additional resource bundle files. michael@0: !ENDIF michael@0: !ELSE michael@0: !MESSAGE Warning: cannot find "lang\resfiles.mk" michael@0: !ENDIF michael@0: michael@0: !IFDEF LANG_SOURCE michael@0: LANG_FILES = lang\root.txt $(LANG_ALIAS_SOURCE) $(LANG_SOURCE) michael@0: LANG_RES_FILES = $(LANG_FILES:.txt =.res lang\) michael@0: LANG_RES_FILES = $(LANG_RES_FILES:.txt=.res) michael@0: LANG_RES_FILES = lang\pool.res $(LANG_RES_FILES:lang\ =lang\) michael@0: ALL_RES = $(ALL_RES) lang\res_index.res michael@0: !ENDIF michael@0: michael@0: # Read the list of region display name resource bundle files michael@0: !IF EXISTS("$(ICUSRCDATA)\region\resfiles.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\region\resfiles.mk" michael@0: !IF EXISTS("$(ICUSRCDATA)\region\reslocal.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\region\reslocal.mk" michael@0: REGION_SOURCE=$(REGION_SOURCE) $(REGION_SOURCE_LOCAL) michael@0: !ELSE michael@0: !MESSAGE Information: cannot find "region\reslocal.mk". Not building user-additional resource bundle files. michael@0: !ENDIF michael@0: !ELSE michael@0: !MESSAGE Warning: cannot find "region\resfiles.mk" michael@0: !ENDIF michael@0: michael@0: !IFDEF REGION_SOURCE michael@0: REGION_FILES = region\root.txt $(REGION_ALIAS_SOURCE) $(REGION_SOURCE) michael@0: REGION_RES_FILES = $(REGION_FILES:.txt =.res region\) michael@0: REGION_RES_FILES = $(REGION_RES_FILES:.txt=.res) michael@0: REGION_RES_FILES = region\pool.res $(REGION_RES_FILES:region\ =region\) michael@0: ALL_RES = $(ALL_RES) region\res_index.res michael@0: !ENDIF michael@0: michael@0: # Read the list of time zone display name resource bundle files michael@0: !IF EXISTS("$(ICUSRCDATA)\zone\resfiles.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\zone\resfiles.mk" michael@0: !IF EXISTS("$(ICUSRCDATA)\zone\reslocal.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\zone\reslocal.mk" michael@0: ZONE_SOURCE=$(ZONE_SOURCE) $(ZONE_SOURCE_LOCAL) michael@0: !ELSE michael@0: !MESSAGE Information: cannot find "zone\reslocal.mk". Not building user-additional resource bundle files. michael@0: !ENDIF michael@0: !ELSE michael@0: !MESSAGE Warning: cannot find "zone\resfiles.mk" michael@0: !ENDIF michael@0: michael@0: !IFDEF ZONE_SOURCE michael@0: ZONE_FILES = zone\root.txt $(ZONE_ALIAS_SOURCE) $(ZONE_SOURCE) michael@0: ZONE_RES_FILES = $(ZONE_FILES:.txt =.res zone\) michael@0: ZONE_RES_FILES = $(ZONE_RES_FILES:.txt=.res) michael@0: ZONE_RES_FILES = zone\pool.res $(ZONE_RES_FILES:zone\ =zone\) michael@0: ALL_RES = $(ALL_RES) zone\res_index.res michael@0: !ENDIF michael@0: michael@0: # Read the list of collation resource bundle files michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICUCOL)\colfiles.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICUCOL)\colfiles.mk" michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICUCOL)\collocal.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICUCOL)\collocal.mk" michael@0: COLLATION_SOURCE=$(COLLATION_SOURCE) $(COLLATION_SOURCE_LOCAL) michael@0: !ELSE michael@0: !MESSAGE Information: cannot find "collocal.mk". Not building user-additional resource bundle files. michael@0: !ENDIF michael@0: !ELSE michael@0: !MESSAGE Warning: cannot find "colfiles.mk" michael@0: !ENDIF michael@0: michael@0: !IFDEF COLLATION_SOURCE michael@0: COL_FILES = $(ICUCOL)\root.txt $(COLLATION_ALIAS_SOURCE) $(COLLATION_SOURCE) michael@0: COL_COL_FILES = $(COL_FILES:.txt =.res coll\) michael@0: COL_COL_FILES = $(COL_COL_FILES:.txt=.res) michael@0: COL_COL_FILES = $(COL_COL_FILES:coll\ =) michael@0: ALL_RES = $(ALL_RES) $(ICUCOL)\res_index.res michael@0: !ENDIF michael@0: michael@0: # Read the list of RBNF resource bundle files michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICURBNF)\rbnffiles.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICURBNF)\rbnffiles.mk" michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICURBNF)\rbnflocal.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICURBNF)\rbnflocal.mk" michael@0: RBNF_SOURCE=$(RBNF_SOURCE) $(RBNF_SOURCE_LOCAL) michael@0: !ELSE michael@0: !MESSAGE Information: cannot find "rbnflocal.mk". Not building user-additional resource bundle files. michael@0: !ENDIF michael@0: !ELSE michael@0: !MESSAGE Warning: cannot find "rbnffiles.mk" michael@0: !ENDIF michael@0: michael@0: !IFDEF RBNF_SOURCE michael@0: RBNF_FILES = $(ICURBNF)\root.txt $(RBNF_ALIAS_SOURCE) $(RBNF_SOURCE) michael@0: RBNF_RES_FILES = $(RBNF_FILES:.txt =.res rbnf\) michael@0: RBNF_RES_FILES = $(RBNF_RES_FILES:.txt=.res) michael@0: RBNF_RES_FILES = $(RBNF_RES_FILES:rbnf\ =rbnf\) michael@0: ALL_RES = $(ALL_RES) $(ICURBNF)\res_index.res michael@0: !ENDIF michael@0: michael@0: # Read the list of transliterator resource bundle files michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICUTRNS)\trnsfiles.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICUTRNS)\trnsfiles.mk" michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICUTRNS)\trnslocal.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICUTRNS)\trnslocal.mk" michael@0: TRANSLIT_SOURCE=$(TRANSLIT_SOURCE) $(TRANSLIT_SOURCE_LOCAL) michael@0: !ELSE michael@0: !MESSAGE Information: cannot find "trnslocal.mk". Not building user-additional transliterator files. michael@0: !ENDIF michael@0: !ELSE michael@0: !MESSAGE Warning: cannot find "trnsfiles.mk" michael@0: !ENDIF michael@0: michael@0: !IFDEF TRANSLIT_SOURCE michael@0: TRANSLIT_FILES = $(ICUTRNS)\$(TRANSLIT_ALIAS_SOURCE) $(TRANSLIT_SOURCE) michael@0: TRANSLIT_RES_FILES = $(TRANSLIT_FILES:.txt =.res translit\) michael@0: TRANSLIT_RES_FILES = $(TRANSLIT_RES_FILES:.txt=.res) michael@0: TRANSLIT_RES_FILES = $(TRANSLIT_RES_FILES:translit\ =translit\) michael@0: #ALL_RES = $(ALL_RES) $(ICUTRNS)\res_index.res michael@0: !ENDIF michael@0: michael@0: # Read the list of miscellaneous resource bundle files michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICUMISC2)\miscfiles.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICUMISC2)\miscfiles.mk" michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICUMISC2)\misclocal.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICUMISC2)\misclocal.mk" michael@0: MISC_SOURCE=$(MISC_SOURCE) $(MISC_SOURCE_LOCAL) michael@0: !ELSE michael@0: !MESSAGE Information: cannot find "misclocal.mk". Not building user-additional miscellaenous files. michael@0: !ENDIF michael@0: !ELSE michael@0: !MESSAGE Warning: cannot find "miscfiles.mk" michael@0: !ENDIF michael@0: michael@0: MISC_FILES = $(MISC_SOURCE:.txt=.res) michael@0: michael@0: # don't include COL_FILES michael@0: ALL_RES = $(ALL_RES) $(RB_FILES) $(MISC_FILES) michael@0: !ENDIF michael@0: michael@0: # Read the list of stringprep profile files michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICUSPREP)\sprepfiles.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICUSPREP)\sprepfiles.mk" michael@0: !IF EXISTS("$(ICUSRCDATA)\$(ICUSPREP)\spreplocal.mk") michael@0: !INCLUDE "$(ICUSRCDATA)\$(ICUSPREP)\spreplocal.mk" michael@0: SPREP_SOURCE=$(SPREP_SOURCE) $(SPREP_SOURCE_LOCAL) michael@0: !ELSE michael@0: !MESSAGE Information: cannot find "spreplocal.mk". Not building user-additional stringprep files. michael@0: !ENDIF michael@0: !ELSE michael@0: !MESSAGE Warning: cannot find "sprepfiles.mk" michael@0: !ENDIF michael@0: michael@0: SPREP_FILES = $(SPREP_SOURCE:.txt=.spp) michael@0: michael@0: # Common defines for both ways of building ICU's data library. michael@0: COMMON_ICUDATA_DEPENDENCIES="$(ICUPBIN)\pkgdata.exe" "$(ICUTMP)\icudata.res" "$(ICUP)\source\stubdata\stubdatabuilt.txt" michael@0: COMMON_ICUDATA_ARGUMENTS=-f -e $(U_ICUDATA_NAME) -v $(ICU_PACKAGE_MODE) -c -p $(ICUPKG) -T "$(ICUTMP)" -L $(U_ICUDATA_NAME) -d "$(ICUBLD_PKG)" -s . michael@0: michael@0: ############################################################################# michael@0: # michael@0: # ALL michael@0: # This target builds all the data files. The world starts here. michael@0: # Note: we really want the common data dll to go to $(DLL_OUTPUT), not $(ICUBLD_PKG). But specifying michael@0: # that here seems to cause confusion with the building of the stub library of the same name. michael@0: # Building the common dll in $(ICUBLD_PKG) unconditionally copies it to $(DLL_OUTPUT) too. michael@0: # michael@0: ############################################################################# michael@0: ALL : GODATA "$(ICU_LIB_TARGET)" "$(TESTDATAOUT)\testdata.dat" michael@0: @echo All targets are up to date michael@0: michael@0: # The core Unicode properties files (uprops.icu, ucase.icu, ubidi.icu) michael@0: # are hardcoded in the common DLL and therefore not included in the data package any more. michael@0: # They are not built by default but need to be built for ICU4J data and for getting the .c source files michael@0: # when updating the Unicode data. michael@0: # Changed in makedata.mak revision 1.117. See Jitterbug 4497. michael@0: # 2010-dec Removed pnames.icu. michael@0: # Command line: michael@0: # C:\svn\icuproj\icu\trunk\source\data>nmake -f makedata.mak ICUMAKE=C:\svn\icuproj\icu\trunk\source\data\ CFG=x86\Debug uni-core-data michael@0: uni-core-data: GODATA "$(ICUBLD_PKG)\pnames.icu" "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\ubidi.icu" michael@0: @echo Unicode .icu files built to "$(ICUBLD_PKG)" michael@0: michael@0: # Build the ICU4J icudata.jar and testdata.jar. michael@0: # see icu4j-readme.txt michael@0: michael@0: ICU4J_TZDATA="$(ICUOUT)\icu4j\icutzdata.jar" michael@0: ICU4J_DATA_DIRNAME=com\ibm\icu\impl\data\$(U_ICUDATA_NAME)b michael@0: ICU4J_TZDATA_PATHS=$(ICU4J_DATA_DIRNAME)\zoneinfo64.res $(ICU4J_DATA_DIRNAME)\metaZones.res $(ICU4J_DATA_DIRNAME)\timezoneTypes.res $(ICU4J_DATA_DIRNAME)\windowsZones.res michael@0: michael@0: generate-data: GODATA "$(ICUOUT)\$(ICUPKG).dat" uni-core-data michael@0: if not exist "$(ICUOUT)\icu4j\$(ICU4J_DATA_DIRNAME)" mkdir "$(ICUOUT)\icu4j\$(ICU4J_DATA_DIRNAME)" michael@0: if not exist "$(ICUOUT)\icu4j\tzdata\$(ICU4J_DATA_DIRNAME)" mkdir "$(ICUOUT)\icu4j\tzdata\$(ICU4J_DATA_DIRNAME)" michael@0: echo pnames.icu ubidi.icu ucase.icu uprops.icu > "$(ICUOUT)\icu4j\add.txt" michael@0: "$(ICUPBIN)\icupkg" "$(ICUOUT)\$(ICUPKG).dat" "$(ICUOUT)\icu4j\$(U_ICUDATA_NAME)b.dat" -a "$(ICUOUT)\icu4j\add.txt" -s "$(ICUBLD_PKG)" -x * -tb -d "$(ICUOUT)\icu4j\$(ICU4J_DATA_DIRNAME)" michael@0: @for %f in ($(ICU4J_TZDATA_PATHS)) do @move "$(ICUOUT)\icu4j\%f" "$(ICUOUT)\icu4j\tzdata\$(ICU4J_DATA_DIRNAME)" michael@0: michael@0: "$(ICUOUT)\icu4j\icutzdata.jar": GODATA generate-data michael@0: "$(JAR)" cf "$(ICUOUT)\icu4j\icutzdata.jar" -C "$(ICUOUT)\icu4j\tzdata" "$(ICU4J_DATA_DIRNAME)" michael@0: michael@0: # Build icudata.jar: michael@0: # - add the uni-core-data to the ICU package michael@0: # - swap the ICU data michael@0: # - extract all data items michael@0: # - package them into the .jar file michael@0: "$(ICUOUT)\icu4j\icudata.jar": GODATA generate-data michael@0: "$(JAR)" cf "$(ICUOUT)\icu4j\icudata.jar" -C "$(ICUOUT)\icu4j" "$(ICU4J_DATA_DIRNAME)" michael@0: michael@0: # Build testdata.jar: michael@0: # - swap the test data michael@0: # - extract all data items michael@0: # - package them into the .jar file michael@0: "$(ICUOUT)\icu4j\testdata.jar": GODATA "$(TESTDATAOUT)\testdata.dat" michael@0: if not exist "$(ICUOUT)\icu4j\com\ibm\icu\dev\data\testdata" mkdir "$(ICUOUT)\icu4j\com\ibm\icu\dev\data\testdata" michael@0: "$(ICUPBIN)\icupkg" "$(TESTDATAOUT)\testdata.dat" -r test.icu -x * -tb -d "$(ICUOUT)\icu4j\com\ibm\icu\dev\data\testdata" michael@0: "$(JAR)" cf "$(ICUOUT)\icu4j\testdata.jar" -C "$(ICUOUT)\icu4j" com\ibm\icu\dev\data\testdata michael@0: michael@0: ## Compare to: source\data\Makefile.in and source\test\testdata\Makefile.in michael@0: michael@0: DEBUGUTILITIESDATA_DIR=main\tests\core\src\com\ibm\icu\dev\test\util michael@0: DEBUGUTILITIESDATA_SRC=DebugUtilitiesData.java michael@0: michael@0: # Build DebugUtilitiesData.java michael@0: "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" : {"$(ICUTOOLS)\gentest\$(CFG)"}gentest.exe michael@0: if not exist "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)" mkdir "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)" michael@0: "$(ICUTOOLS)\gentest\$(CFG)\gentest" -j -d"$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)" michael@0: michael@0: ICU4J_DATA="$(ICUOUT)\icu4j\icudata.jar" "$(ICUOUT)\icu4j\testdata.jar" "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" michael@0: michael@0: icu4j-data: GODATA $(ICU4J_DATA) $(ICU4J_TZDATA) michael@0: michael@0: !IFDEF ICU4J_ROOT michael@0: michael@0: "$(ICU4J_ROOT)\main\shared\data\icudata.jar": "$(ICUOUT)\icu4j\icudata.jar" michael@0: if not exist "$(ICU4J_ROOT)\main\shared\data" mkdir "$(ICU4J_ROOT)\main\shared\data" michael@0: copy "$(ICUOUT)\icu4j\icudata.jar" "$(ICU4J_ROOT)\main\shared\data" michael@0: michael@0: "$(ICU4J_ROOT)\main\shared\data\icutzdata.jar": "$(ICUOUT)\icu4j\icutzdata.jar" michael@0: if not exist "$(ICU4J_ROOT)\main\shared\data" mkdir "$(ICU4J_ROOT)\main\shared\data" michael@0: copy "$(ICUOUT)\icu4j\icutzdata.jar" "$(ICU4J_ROOT)\main\shared\data" michael@0: michael@0: "$(ICU4J_ROOT)\main\shared\data\testdata.jar": "$(ICUOUT)\icu4j\testdata.jar" michael@0: if not exist "$(ICU4J_ROOT)\main\shared\data" mkdir "$(ICU4J_ROOT)\main\shared\data" michael@0: copy "$(ICUOUT)\icu4j\testdata.jar" "$(ICU4J_ROOT)\main\shared\data" michael@0: michael@0: # "$(DEBUGUTILTIESDATA_OUT)" michael@0: michael@0: "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)": "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" michael@0: if not exist "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)" mkdir "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)" michael@0: copy "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" michael@0: michael@0: ICU4J_DATA_INSTALLED="$(ICU4J_ROOT)\main\shared\data\icudata.jar" "$(ICU4J_ROOT)\main\shared\data\icutzdata.jar" "$(ICU4J_ROOT)\main\shared\data\testdata.jar" "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" michael@0: michael@0: icu4j-data-install : GODATA $(ICU4J_DATA) $(ICU4J_TZDATA) $(ICU4J_DATA_INSTALLED) michael@0: @echo ICU4J data output to "$(ICU4J_ROOT)" michael@0: michael@0: !ELSE michael@0: michael@0: icu4j-data-install : michael@0: @echo ERROR ICU4J_ROOT not set michael@0: @exit 1 michael@0: michael@0: !ENDIF michael@0: michael@0: michael@0: michael@0: # michael@0: # testdata - nmake will invoke pkgdata, which will create testdata.dat michael@0: # michael@0: "$(TESTDATAOUT)\testdata.dat": "$(TESTDATA)\*" "$(ICUBLD_PKG)\$(ICUCOL)\ucadata.icu" $(TRANSLIT_RES_FILES) $(MISC_FILES) $(RB_FILES) {"$(ICUTOOLS)\genrb\$(CFG)"}genrb.exe michael@0: @cd "$(TESTDATA)" michael@0: @echo building testdata... michael@0: nmake /nologo /f "$(TESTDATA)\testdata.mak" TESTDATA=. ICUTOOLS="$(ICUTOOLS)" ICUPBIN="$(ICUPBIN)" ICUP="$(ICUP)" CFG=$(CFG) TESTDATAOUT="$(TESTDATAOUT)" TESTDATABLD="$(TESTDATABLD)" michael@0: michael@0: #invoke pkgdata for ICU common data michael@0: # pkgdata will drop all output files (.dat, .dll, .lib) into the target (ICUBLD_PKG) directory. michael@0: # move the .dll and .lib files to their final destination afterwards. michael@0: # The $(U_ICUDATA_NAME).lib and $(U_ICUDATA_NAME).exp should already be in the right place due to stubdata. michael@0: # michael@0: # 2005-may-05 Removed Unicode properties files (unorm.icu, uprops.icu, ucase.icu, ubidi.icu) michael@0: # from data build. See Jitterbug 4497. (makedata.mak revision 1.117) michael@0: # michael@0: !IFDEF ICUDATA_SOURCE_ARCHIVE michael@0: "$(ICU_LIB_TARGET)" : $(COMMON_ICUDATA_DEPENDENCIES) "$(ICUDATA_SOURCE_ARCHIVE)" michael@0: @echo Building icu data from $(ICUDATA_SOURCE_ARCHIVE) michael@0: cd "$(ICUBLD_PKG)" michael@0: "$(ICUPBIN)\icupkg" -x * --list "$(ICUDATA_SOURCE_ARCHIVE)" > "$(ICUTMP)\icudata.lst" michael@0: "$(ICUPBIN)\pkgdata" $(COMMON_ICUDATA_ARGUMENTS) "$(ICUTMP)\icudata.lst" michael@0: copy "$(U_ICUDATA_NAME).dll" "$(DLL_OUTPUT)" michael@0: -@erase "$(U_ICUDATA_NAME).dll" michael@0: copy "$(ICUTMP)\$(ICUPKG).dat" "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat" michael@0: -@erase "$(ICUTMP)\$(ICUPKG).dat" michael@0: !ELSE michael@0: "$(ICU_LIB_TARGET)" : $(COMMON_ICUDATA_DEPENDENCIES) $(CNV_FILES) $(CNV_FILES_SPECIAL) "$(ICUBLD_PKG)\unames.icu" "$(ICUBLD_PKG)\cnvalias.icu" "$(ICUBLD_PKG)\nfc.nrm" "$(ICUBLD_PKG)\nfkc.nrm" "$(ICUBLD_PKG)\nfkc_cf.nrm" "$(ICUBLD_PKG)\uts46.nrm" "$(ICUBLD_PKG)\$(ICUCOL)\ucadata.icu" "$(ICUBLD_PKG)\$(ICUCOL)\invuca.icu" $(CURR_RES_FILES) $(LANG_RES_FILES) $(REGION_RES_FILES) $(ZONE_RES_FILES) $(BRK_FILES) $(BRK_DICT_FILES) $(BRK_RES_FILES) $(ALL_RES) $(COL_COL_FILES) $(RBNF_RES_FILES) $(TRANSLIT_RES_FILES) $(SPREP_FILES) "$(ICUBLD_PKG)\confusables.cfu" michael@0: @echo Building icu data michael@0: cd "$(ICUBLD_PKG)" michael@0: "$(ICUPBIN)\pkgdata" $(COMMON_ICUDATA_ARGUMENTS) <<"$(ICUTMP)\icudata.lst" michael@0: unames.icu michael@0: confusables.cfu michael@0: $(ICUCOL)\ucadata.icu michael@0: $(ICUCOL)\invuca.icu michael@0: cnvalias.icu michael@0: nfc.nrm michael@0: nfkc.nrm michael@0: nfkc_cf.nrm michael@0: uts46.nrm michael@0: $(CNV_FILES:.cnv =.cnv michael@0: ) michael@0: $(CNV_FILES_SPECIAL:.cnv =.cnv michael@0: ) michael@0: $(ALL_RES:.res =.res michael@0: ) michael@0: $(CURR_RES_FILES:.res =.res michael@0: ) michael@0: $(LANG_RES_FILES:.res =.res michael@0: ) michael@0: $(REGION_RES_FILES:.res =.res michael@0: ) michael@0: $(ZONE_RES_FILES:.res =.res michael@0: ) michael@0: $(COL_COL_FILES:.res =.res michael@0: ) michael@0: $(RBNF_RES_FILES:.res =.res michael@0: ) michael@0: $(TRANSLIT_RES_FILES:.res =.res michael@0: ) michael@0: $(BRK_FILES:.brk =.brk michael@0: ) michael@0: $(BRK_DICT_FILES:.dict =.dict michael@0: ) michael@0: $(BRK_RES_FILES:.res =.res michael@0: ) michael@0: $(SPREP_FILES:.spp=.spp michael@0: ) michael@0: <