#********************************************************************** #* Copyright (C) 1999-2000, International Business Machines Corporation #* and others. All Rights Reserved. #********************************************************************** # nmake file for creating data files on win32 # invoke with # nmake /f makedata.mak icup= [Debug|Release] # # 12/10/1999 weiv Created #If no config, we default to debug !IF "$(CFG)" == "" CFG=Debug !MESSAGE No configuration specified. Defaulting to common - Win32 Debug. !ENDIF #Here we test if a valid configuration is given !IF "$(CFG)" != "Release" && "$(CFG)" != "release" && "$(CFG)" != "Debug" && "$(CFG)" != "debug" !MESSAGE Invalid configuration "$(CFG)" specified. !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "makedata.mak" CFG="Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "Release" !MESSAGE "Debug" !MESSAGE !ERROR An invalid configuration is specified. !ENDIF #Let's see if user has given us a path to ICU #This could be found according to the path to makefile, but for now it is this way !IF "$(ICUP)"=="" !ERROR Can't find path! !ENDIF !MESSAGE icu path is $(ICUP) ICUDATA=$(ICUP)\data TESTDATA=$(ICUP)\source\test\testdata #If ICU_DATA is not set, we want to output stuff in binary directory !IF "$(ICU_DATA)" == "" DLL_OUTPUT=$(ICUP)\bin TESTDATAOUT=$(TESTDATA) #TESTDATAOUT=$(DLL_OUTPUT) !MESSAGE ICU_DATA is not set! icudata.dll will go to $(DLL_OUTPUT) !ELSE DLL_OUTPUT=$(ICUDATA) TESTDATAOUT=$(TESTDATA) !ENDIF ICD=$(ICUDATA)^\ DATA_PATH=$(ICUP)\data^\ TEST=..\source\test\testdata^\ ICUTOOLS=$(ICUP)\source\tools # We have to prepare params for pkgdata - to help it find the tools !IF "$(CFG)" == "Debug" || "$(CFG)" == "debug" PKGOPT=D:$(ICUP) !ELSE PKGOPT=R:$(ICUP) !ENDIF # This appears in original Microsofts makefiles !IF "$(OS)" == "Windows_NT" NULL= !ELSE NULL=nul !ENDIF # Adjust the path to find DLLs. If icudata.dll really needs to be in $(ICUP)\bin\$(CFG), # then add $(ICUP)\bin\$(CFG) to this path, as the other DLLs are in $(ICUP)\bin. PATH = $(PATH);$(ICUP)\bin # 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("$(ICUTOOLS)\makeconv\ucmfiles.mk") !INCLUDE "$(ICUTOOLS)\makeconv\ucmfiles.mk" !IF EXISTS("$(ICUTOOLS)\makeconv\ucmlocal.mk") !INCLUDE "$(ICUTOOLS)\makeconv\ucmlocal.mk" $(UCM_SOURCE)=$(UCM_SOURCE) $(UCM_SOURCE_LOCAL) !ELSE #!MESSAGE Warning: cannot find "ucmlocal.mk" !ENDIF !ELSE !ERROR ERROR: cannot find "ucmfiles.mk" !ENDIF CNV_FILES=$(UCM_SOURCE:.ucm=.cnv) # Read list of resource bundle files !IF EXISTS("$(ICUTOOLS)\genrb\genrbfiles.mk") !INCLUDE "$(ICUTOOLS)\genrb\genrbfiles.mk" !IF EXISTS("$(ICUTOOLS)\genrb\genrblocal.mk") !INCLUDE "$(ICUTOOLS)\genrb\genrblocal.mk" GENRB_SOURCE=$(GENRB_SOURCE) $(GENRB_SOURCE_LOCAL) !ELSE #!MESSAGE Warning: cannot find "genrblocal.mk" !ENDIF !ELSE !ERROR ERROR: cannot find "genrbfiles.mk" !ENDIF RB_FILES = $(GENRB_SOURCE:.txt=.res) TRANSLIT_FILES = $(TRANSLIT_SOURCE:.txt=.res) # This target should build all the data files ALL : GODATA test.dat base_test.dat test_dat.dll base_test_dat.dll base_dat.dll "$(TESTDATAOUT)\testdata.dll" "$(DLL_OUTPUT)\icudata.dll" test1.cnv test3.cnv test4.cnv GOBACK #icudata.dat @echo All targets are up to date BRK_FILES = "$(ICUDATA)\sent.brk" "$(ICUDATA)\char.brk" "$(ICUDATA)\line.brk" "$(ICUDATA)\word.brk" "$(ICUDATA)\line_th.brk" "$(ICUDATA)\word_th.brk" #invoke pkgdata "$(DLL_OUTPUT)\icudata.dll" : $(CNV_FILES) $(BRK_FILES) uprops.dat unames.dat cnvalias.dat tz.dat $(RB_FILES) $(TRANSLIT_FILES) @echo Building icu data @"$(ICUTOOLS)\pkgdata\$(CFG)\pkgdata" -v -m dll -c -p icudata -O "$(PKGOPT)" -d "$(DLL_OUTPUT)" -s "$(ICUDATA)" <