#********************************************************************** #* Copyright (C) 1999-2001, International Business Machines Corporation #* and others. All Rights Reserved. #********************************************************************** # nmake file for creating data files on win32 # invoke with # nmake /f makedata.mak [Debug|Release] # # 12/10/1999 weiv Created U_ICUDATA_NAME=icudt19 U_ICUDATA_ENDIAN_SUFFIX=l # ICUDBLD # Must be provided by whoever runs this makefile. # Is the directory containing this file (makedata.mak) # Is the directory into which most data is built (prior to packaging) # Is icu\source\data\build # !IF "$(ICUDBLD)"=="" !ERROR Can't find ICUDBLD (ICU Data Build dir, should point to icu\source\data\build\ )! !ENDIF !MESSAGE icu data build path is $(ICUDBLD) # ICUP # The root of the ICU source directory tree # ICUP=$(ICUDBLD)\..\..\.. # # ICUDATA # The source directory. Contains the source files for the common data to be built. # WARNING: NOT THE SAME AS ICU_DATA environment variable. Confusing. ICUDATA=$(ICUP)\data # # DLL_OUTPUT # Destination directory for the common data DLL file. # This is the same place that all of the other ICU DLLs go (the code-containing DLLs) # The lib file for the data DLL goes in $(DLL_OUTPUT)/../lib/ # DLL_OUTPUT=$(ICUP)\bin # # TESTDATA # The source directory for data needed for test programs. TESTDATA=$(ICUP)\source\test\testdata # # TESTDATAOUT # The destination directory for the built test data .dat file # When running the tests, ICU_DATA environment variable is set to here # so that test data files can be loaded. (Tests are NOT run from this makefile, # only the data is put in place.) TESTDATAOUT=$(ICUP)\source\data # # ICUTOOLS # Directory under which all of the ICU data building tools live. # ICUTOOLS=$(ICUP)\source\tools PATH = $(PATH);$(ICUP)\bin # We have to prepare params for pkgdata - to help it find the tools !IF "$(CFG)" == "Debug" || "$(CFG)" == "debug" !MESSAGE makedata.mak: doing a Debug build. PKGOPT=D:$(ICUP) !ELSE !MESSAGE makedata.mak: doing a Release build. PKGOPT=R:$(ICUP) !ENDIF # Suffixes for data files .SUFFIXES : .ucm .cnv .dll .dat .res .txt .c # We're including a list of ucm files. There are two lists, one is essential 'ucmfiles.mk' and # the other is optional 'ucmlocal.mk' !IF EXISTS("$(ICUDATA)\ucmfiles.mk") !INCLUDE "$(ICUDATA)\ucmfiles.mk" UCM_SOURCE=$(UCM_SOURCE) !IF EXISTS("$(ICUDATA)\ucmebcdic.mk") !INCLUDE "$(ICUDATA)\ucmebcdic.mk" UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_EBCDIC) !IF EXISTS("$(ICUDATA)\ucmlocal.mk") !INCLUDE "$(ICUDATA)\ucmlocal.mk" UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_EBCDIC) $(UCM_SOURCE_LOCAL) !ELSE #!MESSAGE Warning: cannot find "ucmlocal.mk" !ENDIF !ELSE !MESSAGE Warning: cannot find "ucmebcdic.mk".Not building EBCDIC converter files !ENDIF !ELSE !ERROR ERROR: cannot find "ucmfiles.mk" !ENDIF CNV_FILES=$(UCM_SOURCE:.ucm=.cnv) # Read list of resource bundle files !IF EXISTS("$(ICUDATA)\resfiles.mk") !INCLUDE "$(ICUDATA)\resfiles.mk" !IF EXISTS("$(ICUDATA)\reslocal.mk") !INCLUDE "$(ICUDATA)\reslocal.mk" GENRB_SOURCE=$(GENRB_SOURCE) $(GENRB_SOURCE_LOCAL) !ELSE #!MESSAGE Warning: cannot find "reslocal.mk" !ENDIF !ELSE !ERROR ERROR: cannot find "resfiles.mk" !ENDIF RB_FILES = $(GENRB_SOURCE:.txt=.res) TRANSLIT_FILES = $(TRANSLIT_SOURCE:.txt=.res) ALL_RES = $(RB_FILES) $(TRANSLIT_FILES) RB_SOURCE_DIR = $(GENRB_SOURCE:$=$) ############################################################################# # # ALL # This target builds all the data files. The world starts here. # Note: we really want the common data dll to go to $(DLL_OUTPUT), not $(ICUBLD). But specifying # that here seems to cause confusion with the building of the stub library of the same name. # Building the common dll in $(ICUBLD) unconditionally copies it to $(DLL_OUTPUT) too. # ############################################################################# ALL : GODATA testdata "$(ICUDBLD)\$(U_ICUDATA_NAME).dll" $(TESTDATAOUT)\test1.cnv $(TESTDATAOUT)\test3.cnv $(TESTDATAOUT)\test4.cnv @echo All targets are up to date # # testdata - nmake will invoke pkgdata, which will create testdata.dat # testdata: ucadata.dat $(RB_FILES) {"$(ICUTOOLS)\genrb\$(CFG)"}genrb.exe @cd "$(TESTDATA)" nmake /nologo /f $(TESTDATA)\testdata.mk TESTDATA=$(TESTDATA) ICUTOOLS=$(ICUTOOLS) PKGOPT=$(PKGOPT) CFG=$(CFG) TESTDATAOUT=$(TESTDATAOUT) ICUDATA=$(ICUDATA) @cd "$(ICUDBLD)" BRK_FILES = "$(ICUDBLD)\sent.brk" "$(ICUDBLD)\char.brk" "$(ICUDBLD)\line.brk" "$(ICUDBLD)\word.brk" "$(ICUDBLD)\line_th.brk" "$(ICUDBLD)\word_th.brk" #invoke pkgdata for ICU common data # pkgdata will drop all output files (.dat, .dll, .lib) into the target (ICUDBLD) directory. # move the .dll and .lib files to their final destination afterwards. # "$(ICUDBLD)\$(U_ICUDATA_NAME).dll" : $(CNV_FILES) $(BRK_FILES) uprops.dat unames.dat unorm.dat cnvalias.dat tz.dat ucadata.dat invuca.dat $(ALL_RES) icudata.res $(ICUP)\source\stubdata\stubdatabuilt.txt @echo Building icu data @cd "$(ICUDBLD)" "$(ICUTOOLS)\pkgdata\$(CFG)\pkgdata" -e $(U_ICUDATA_NAME) -v -m dll -c -p $(U_ICUDATA_NAME) -O "$(PKGOPT)" -d "$(ICUDBLD)" -s . <