1 #********************************************************************** 2 #* Copyright (C) 1999-2009, International Business Machines Corporation 3 #* and others. All Rights Reserved. 4 #********************************************************************** 5 # nmake file for creating data files on win32 6 # invoke with 7 # nmake /f makedata.mak icumake=$(ProjectDir) 8 # 9 # 12/10/1999 weiv Created 10 11 ############################################################################## 12 # Keep the following in sync with the version - see common/unicode/uversion.h 13 U_ICUDATA_NAME=icudt42 14 ############################################################################## 15 U_ICUDATA_ENDIAN_SUFFIX=l 16 UNICODE_VERSION=5.1 17 ICU_LIB_TARGET=$(DLL_OUTPUT)\$(U_ICUDATA_NAME).dll 18 19 # ICUMAKE 20 # Must be provided by whoever runs this makefile. 21 # Is the directory containing this file (makedata.mak) 22 # Is the directory into which most data is built (prior to packaging) 23 # Is icu\source\data\build 24 # 25 !IF "$(ICUMAKE)"=="" 26 !ERROR Can't find ICUMAKE (ICU Data Make dir, should point to icu\source\data\ )! 27 !ENDIF 28 !MESSAGE ICU data make path is $(ICUMAKE) 29 30 # Suffixes for data files 31 .SUFFIXES : .ucm .cnv .dll .dat .res .txt .c 32 33 ICUOUT=$(ICUMAKE)\out 34 35 # the prefix "icudt21_" for use in filenames 36 ICUPKG=$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX) 37 38 # need to nuke \\ for .NET... 39 ICUOUT=$(ICUOUT:\\=\) 40 41 ICUBLD=$(ICUOUT)\build 42 ICUBLD_PKG=$(ICUBLD)\$(ICUPKG) 43 ICUTMP=$(ICUOUT)\tmp 44 45 # ICUP 46 # The root of the ICU source directory tree 47 # 48 ICUP=$(ICUMAKE)\..\.. 49 ICUP=$(ICUP:\source\data\..\..=) 50 # In case the first one didn't do it, try this one. .NET would do the second one. 51 ICUP=$(ICUP:\source\data\\..\..=) 52 !MESSAGE ICU root path is $(ICUP) 53 54 55 # ICUSRCDATA 56 # The data directory in source 57 # 58 ICUSRCDATA=$(ICUP)\source\data 59 ICUSRCDATA_RELATIVE_PATH=..\..\.. 60 61 # ICUUCM 62 # The directory that contains ucmcore.mk files along with *.ucm files 63 # 64 ICUUCM=mappings 65 66 # ICULOC 67 # The directory that contains resfiles.mk files along with *.txt locale data files 68 # 69 ICULOC=locales 70 71 # ICUCOL 72 # The directory that contains colfiles.mk files along with *.txt collation data files 73 # 74 ICUCOL=coll 75 76 # ICURBNF 77 # The directory that contains rbnffiles.mk files along with *.txt RBNF data files 78 # 79 ICURBNF=rbnf 80 81 # ICUTRNS 82 # The directory that contains trfiles.mk files along with *.txt transliterator files 83 # 84 ICUTRNS=translit 85 86 # ICUBRK 87 # The directory that contains resfiles.mk files along with *.txt break iterator files 88 # 89 ICUBRK=brkitr 90 91 # ICUUNIDATA 92 # The directory that contains Unicode data files 93 # 94 ICUUNIDATA=$(ICUP)\source\data\unidata 95 96 97 # ICUMISC 98 # The directory that contains miscfiles.mk along with files that are miscelleneous data 99 # 100 ICUMISC=$(ICUP)\source\data\misc 101 ICUMISC2=misc 102 103 # ICUBRK 104 # The directory that contains sprepfiles.mk files along with *.txt stringprep files 105 # 106 ICUSPREP=sprep 107 108 # 109 # ICUDATA 110 # The source directory. Contains the source files for the common data to be built. 111 # WARNING: NOT THE SAME AS ICU_DATA environment variable. Confusing. 112 ICUDATA=$(ICUP)\source\data 113 114 # 115 # DLL_OUTPUT 116 # Destination directory for the common data DLL file. 117 # This is the same place that all of the other ICU DLLs go (the code-containing DLLs) 118 # The lib file for the data DLL goes in $(DLL_OUTPUT)/../lib/ 119 # 120 !IF "$(CFG)" == "x64\Release" || "$(CFG)" == "x64\Debug" 121 DLL_OUTPUT=$(ICUP)\bin64 122 !ELSE 123 DLL_OUTPUT=$(ICUP)\bin 124 !ENDIF 125 126 # 127 # TESTDATA 128 # The source directory for data needed for test programs. 129 TESTDATA=$(ICUP)\source\test\testdata 130 131 # 132 # TESTDATAOUT 133 # The destination directory for the built test data .dat file 134 TESTDATAOUT=$(ICUP)\source\test\testdata\out 135 136 # 137 # TESTDATABLD 138 # The build directory for test data intermidiate files 139 # (Tests are NOT run from this makefile, 140 # only the data is put in place.) 141 TESTDATABLD=$(ICUP)\source\test\testdata\out\build 142 143 # 144 # ICUTOOLS 145 # Directory under which all of the ICU data building tools live. 146 # 147 ICUTOOLS=$(ICUP)\source\tools 148 149 # The current ICU tools need to be in the path first. 150 !IF "$(CFG)" == "x64\Release" || "$(CFG)" == "x64\Debug" 151 PATH = $(ICUP)\bin64;$(PATH) 152 ICUPBIN=$(ICUP)\bin64 153 !ELSE 154 PATH = $(ICUP)\bin;$(PATH) 155 ICUPBIN=$(ICUP)\bin 156 !ENDIF 157 158 159 # This variable can be overridden to "-m static" by the project settings, 160 # if you want a static data library. 161 !IF "$(ICU_PACKAGE_MODE)"=="" 162 ICU_PACKAGE_MODE=-m dll 163 !ENDIF 164 165 # If this archive exists, build from that 166 # instead of building everything from scratch. 167 ICUDATA_SOURCE_ARCHIVE=$(ICUSRCDATA)\in\$(ICUPKG).dat 168 !IF !EXISTS("$(ICUDATA_SOURCE_ARCHIVE)") 169 # Does a big endian version exist either? 170 ICUDATA_ARCHIVE=$(ICUSRCDATA)\in\$(U_ICUDATA_NAME)b.dat 171 !IF EXISTS("$(ICUDATA_ARCHIVE)") 172 ICUDATA_SOURCE_ARCHIVE=$(ICUTMP)\$(ICUPKG).dat 173 !ELSE 174 # Nothing was usable for input 175 !UNDEF ICUDATA_SOURCE_ARCHIVE 176 !ENDIF 177 !ENDIF 178 179 !IFDEF ICUDATA_SOURCE_ARCHIVE 180 !MESSAGE ICU data source archive is $(ICUDATA_SOURCE_ARCHIVE) 181 !ELSE 182 # We're including a list of .ucm files. 183 # There are several lists, they are all optional. 184 185 # Always build the mapping files for the EBCDIC fallback codepages 186 # They are necessary on EBCDIC machines, and 187 # the following logic is much easier if UCM_SOURCE is never empty. 188 # (They are small.) 189 UCM_SOURCE=ibm-37_P100-1995.ucm ibm-1047_P100-1995.ucm 190 191 !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmcore.mk") 192 !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmcore.mk" 193 UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_CORE) 194 !ELSE 195 !MESSAGE Warning: cannot find "ucmcore.mk". Not building core MIME/Unix/Windows converter files. 196 !ENDIF 197 198 !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmfiles.mk") 199 !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmfiles.mk" 200 UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_FILES) 201 !ELSE 202 !MESSAGE Warning: cannot find "ucmfiles.mk". Not building many converter files. 203 !ENDIF 204 205 !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmebcdic.mk") 206 !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmebcdic.mk" 207 UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_EBCDIC) 208 !ELSE 209 !MESSAGE Warning: cannot find "ucmebcdic.mk". Not building EBCDIC converter files. 210 !ENDIF 211 212 !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmlocal.mk") 213 !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmlocal.mk" 214 UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_LOCAL) 215 !ELSE 216 !MESSAGE Information: cannot find "ucmlocal.mk". Not building user-additional converter files. 217 !ENDIF 218 219 CNV_FILES=$(UCM_SOURCE:.ucm=.cnv) 220 221 !IF EXISTS("$(ICUSRCDATA)\$(ICUBRK)\brkfiles.mk") 222 !INCLUDE "$(ICUSRCDATA)\$(ICUBRK)\brkfiles.mk" 223 !IF EXISTS("$(ICUSRCDATA)\$(ICUBRK)\brklocal.mk") 224 !INCLUDE "$(ICUSRCDATA)\$(ICUBRK)\brklocal.mk" 225 BRK_SOURCE=$(BRK_SOURCE) $(BRK_SOURCE_LOCAL) 226 BRK_CTD_SOURCE=$(BRK_CTD_SOURCE) $(BRK_CTD_SOURCE_LOCAL) 227 BRK_RES_SOURCE=$(BRK_RES_SOURCE) $(BRK_RES_SOURCE_LOCAL) 228 !ELSE 229 !MESSAGE Information: cannot find "brklocal.mk". Not building user-additional break iterator files. 230 !ENDIF 231 !ELSE 232 !MESSAGE Warning: cannot find "brkfiles.mk" 233 !ENDIF 234 235 # 236 # Break iterator data files. 237 # 238 BRK_FILES=$(ICUBRK)\$(BRK_SOURCE:.txt =.brk brkitr\) 239 BRK_FILES=$(BRK_FILES:.txt=.brk) 240 BRK_FILES=$(BRK_FILES:brkitr\ =brkitr\) 241 242 !IFDEF BRK_CTD_SOURCE 243 BRK_CTD_FILES = $(ICUBRK)\$(BRK_CTD_SOURCE:.txt =.ctd brkitr\) 244 BRK_CTD_FILES = $(BRK_CTD_FILES:.txt=.ctd) 245 BRK_CTD_FILES = $(BRK_CTD_FILES:brkitr\ =) 246 !ENDIF 247 248 !IFDEF BRK_RES_SOURCE 249 BRK_RES_FILES = $(BRK_RES_SOURCE:.txt =.res brkitr\) 250 BRK_RES_FILES = $(BRK_RES_FILES:.txt=.res) 251 BRK_RES_FILES = $(ICUBRK)\root.res $(ICUBRK)\$(BRK_RES_FILES:brkitr\ =) 252 ALL_RES = $(ALL_RES) $(ICUBRK)\res_index.res 253 !ENDIF 254 255 # Read list of locale resource bundle files 256 !IF EXISTS("$(ICUSRCDATA)\$(ICULOC)\resfiles.mk") 257 !INCLUDE "$(ICUSRCDATA)\$(ICULOC)\resfiles.mk" 258 !IF EXISTS("$(ICUSRCDATA)\$(ICULOC)\reslocal.mk") 259 !INCLUDE "$(ICUSRCDATA)\$(ICULOC)\reslocal.mk" 260 GENRB_SOURCE=$(GENRB_SOURCE) $(GENRB_SOURCE_LOCAL) 261 !ELSE 262 !MESSAGE Information: cannot find "reslocal.mk". Not building user-additional resource bundle files. 263 !ENDIF 264 !ELSE 265 !MESSAGE Warning: cannot find "resfiles.mk" 266 !ENDIF 267 268 !IFDEF GENRB_SOURCE 269 RB_FILES = root.res $(GENRB_ALIAS_SOURCE:.txt=.res) $(GENRB_ALIAS_SOURCE_LOCAL:.txt=.res) $(GENRB_SOURCE:.txt=.res) 270 ALL_RES = $(ALL_RES) res_index.res 271 !ENDIF 272 273 274 # Read list of locale resource bundle files 275 !IF EXISTS("$(ICUSRCDATA)\$(ICUCOL)\colfiles.mk") 276 !INCLUDE "$(ICUSRCDATA)\$(ICUCOL)\colfiles.mk" 277 !IF EXISTS("$(ICUSRCDATA)\$(ICUCOL)\collocal.mk") 278 !INCLUDE "$(ICUSRCDATA)\$(ICUCOL)\collocal.mk" 279 COLLATION_SOURCE=$(COLLATION_SOURCE) $(COLLATION_SOURCE_LOCAL) 280 !ELSE 281 !MESSAGE Information: cannot find "collocal.mk". Not building user-additional resource bundle files. 282 !ENDIF 283 !ELSE 284 !MESSAGE Warning: cannot find "colfiles.mk" 285 !ENDIF 286 287 !IFDEF COLLATION_SOURCE 288 COL_FILES = $(ICUCOL)\root.txt $(COLLATION_ALIAS_SOURCE) $(COLLATION_SOURCE) 289 COL_COL_FILES = $(COL_FILES:.txt =.res coll\) 290 COL_COL_FILES = $(COL_COL_FILES:.txt=.res) 291 COL_COL_FILES = $(COL_COL_FILES:coll\ =) 292 ALL_RES = $(ALL_RES) $(ICUCOL)\res_index.res 293 !ENDIF 294 295 # Read list of RBNF resource bundle files 296 !IF EXISTS("$(ICUSRCDATA)\$(ICURBNF)\rbnffiles.mk") 297 !INCLUDE "$(ICUSRCDATA)\$(ICURBNF)\rbnffiles.mk" 298 !IF EXISTS("$(ICUSRCDATA)\$(ICURBNF)\rbnflocal.mk") 299 !INCLUDE "$(ICUSRCDATA)\$(ICURBNF)\rbnflocal.mk" 300 RBNF_SOURCE=$(RBNF_SOURCE) $(RBNF_SOURCE_LOCAL) 301 !ELSE 302 !MESSAGE Information: cannot find "rbnflocal.mk". Not building user-additional resource bundle files. 303 !ENDIF 304 !ELSE 305 !MESSAGE Warning: cannot find "rbnffiles.mk" 306 !ENDIF 307 308 !IFDEF RBNF_SOURCE 309 RBNF_FILES = $(ICURBNF)\root.txt $(RBNF_ALIAS_SOURCE) $(RBNF_SOURCE) 310 RBNF_RES_FILES = $(RBNF_FILES:.txt =.res rbnf\) 311 RBNF_RES_FILES = $(RBNF_RES_FILES:.txt=.res) 312 RBNF_RES_FILES = $(RBNF_RES_FILES:rbnf\ =rbnf\) 313 ALL_RES = $(ALL_RES) $(ICURBNF)\res_index.res 314 !ENDIF 315 316 # Read list of transliterator resource bundle files 317 !IF EXISTS("$(ICUSRCDATA)\$(ICUTRNS)\trnsfiles.mk") 318 !INCLUDE "$(ICUSRCDATA)\$(ICUTRNS)\trnsfiles.mk" 319 !IF EXISTS("$(ICUSRCDATA)\$(ICUTRNS)\trnslocal.mk") 320 !INCLUDE "$(ICUSRCDATA)\$(ICUTRNS)\trnslocal.mk" 321 TRANSLIT_SOURCE=$(TRANSLIT_SOURCE) $(TRANSLIT_SOURCE_LOCAL) 322 !ELSE 323 !MESSAGE Information: cannot find "trnslocal.mk". Not building user-additional transliterator files. 324 !ENDIF 325 !ELSE 326 !MESSAGE Warning: cannot find "trnsfiles.mk" 327 !ENDIF 328 329 !IFDEF TRANSLIT_SOURCE 330 TRANSLIT_FILES = $(ICUTRNS)\$(TRANSLIT_ALIAS_SOURCE) $(TRANSLIT_SOURCE) 331 TRANSLIT_RES_FILES = $(TRANSLIT_FILES:.txt =.res translit\) 332 TRANSLIT_RES_FILES = $(TRANSLIT_RES_FILES:.txt=.res) 333 TRANSLIT_RES_FILES = $(TRANSLIT_RES_FILES:translit\ =translit\) 334 #ALL_RES = $(ALL_RES) $(ICUTRNS)\res_index.res 335 !ENDIF 336 337 # Read list of miscellaneous resource bundle files 338 !IF EXISTS("$(ICUSRCDATA)\$(ICUMISC2)\miscfiles.mk") 339 !INCLUDE "$(ICUSRCDATA)\$(ICUMISC2)\miscfiles.mk" 340 !IF EXISTS("$(ICUSRCDATA)\$(ICUMISC2)\misclocal.mk") 341 !INCLUDE "$(ICUSRCDATA)\$(ICUMISC2)\misclocal.mk" 342 MISC_SOURCE=$(MISC_SOURCE) $(MISC_SOURCE_LOCAL) 343 !ELSE 344 !MESSAGE Information: cannot find "misclocal.mk". Not building user-additional miscellaenous files. 345 !ENDIF 346 !ELSE 347 !MESSAGE Warning: cannot find "miscfiles.mk" 348 !ENDIF 349 350 MISC_FILES = $(MISC_SOURCE:.txt=.res) 351 352 # don't include COL_FILES 353 ALL_RES = $(ALL_RES) $(RB_FILES) $(MISC_FILES) 354 !ENDIF 355 356 # Read list of stringprep profile files 357 !IF EXISTS("$(ICUSRCDATA)\$(ICUSPREP)\sprepfiles.mk") 358 !INCLUDE "$(ICUSRCDATA)\$(ICUSPREP)\sprepfiles.mk" 359 !IF EXISTS("$(ICUSRCDATA)\$(ICUSPREP)\spreplocal.mk") 360 !INCLUDE "$(ICUSRCDATA)\$(ICUSPREP)\spreplocal.mk" 361 SPREP_SOURCE=$(SPREP_SOURCE) $(SPREP_SOURCE_LOCAL) 362 !ELSE 363 !MESSAGE Information: cannot find "spreplocal.mk". Not building user-additional stringprep files. 364 !ENDIF 365 !ELSE 366 !MESSAGE Warning: cannot find "sprepfiles.mk" 367 !ENDIF 368 369 SPREP_FILES = $(SPREP_SOURCE:.txt=.spp) 370 371 # Common defines for both ways of building ICU's data library. 372 COMMON_ICUDATA_DEPENDENCIES="$(ICUPBIN)\pkgdata.exe" "$(ICUTMP)\icudata.res" "$(ICUP)\source\stubdata\stubdatabuilt.txt" 373 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 . 374 375 ############################################################################# 376 # 377 # ALL 378 # This target builds all the data files. The world starts here. 379 # Note: we really want the common data dll to go to $(DLL_OUTPUT), not $(ICUBLD_PKG). But specifying 380 # that here seems to cause confusion with the building of the stub library of the same name. 381 # Building the common dll in $(ICUBLD_PKG) unconditionally copies it to $(DLL_OUTPUT) too. 382 # 383 ############################################################################# 384 ALL : GODATA "$(ICU_LIB_TARGET)" "$(TESTDATAOUT)\testdata.dat" 385 @echo All targets are up to date 386 387 ############################################################################# 388 # 389 # DATALIB 390 # This target builds the data library. It's identical to 391 # ALL except that testdata.dat is not built. 392 # 393 ############################################################################# 394 DATALIB : GODATA "$(ICU_LIB_TARGET)" 395 @echo Data library is built 396 397 398 # Starting with ICU4C 3.4, the core Unicode properties files (uprops.icu, ucase.icu, ubidi.icu, unorm.icu) 399 # are hardcoded in the common DLL and therefore not included in the data package any more. 400 # They are not built by default but need to be built for ICU4J data and for getting the .c source files 401 # when updating the Unicode data. 402 # Changed in makedata.mak revision 1.117. See Jitterbug 4497. 403 # Command line: 404 # C:\svn\icuproj\icu\trunk\source\data>nmake -f makedata.mak ICUMAKE=C:\svn\icuproj\icu\trunk\source\data\ CFG=Debug uni-core-data 405 uni-core-data: GODATA "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\ubidi.icu" "$(ICUBLD_PKG)\unorm.icu" 406 @echo Unicode .icu files built to "$(ICUBLD_PKG)" 407 @echo Unicode .c source files built to "$(ICUTMP)" 408 409 # 410 # testdata - nmake will invoke pkgdata, which will create testdata.dat 411 # 412 "$(TESTDATAOUT)\testdata.dat": "$(TESTDATA)\*" "$(ICUBLD_PKG)\$(ICUCOL)\ucadata.icu" $(TRANSLIT_RES_FILES) $(MISC_FILES) $(RB_FILES) {"$(ICUTOOLS)\genrb\$(CFG)"}genrb.exe 413 @cd "$(TESTDATA)" 414 @echo building testdata... 415 nmake /nologo /f "$(TESTDATA)\testdata.mak" TESTDATA=. ICUTOOLS="$(ICUTOOLS)" ICUPBIN="$(ICUPBIN)" ICUP="$(ICUP)" CFG=$(CFG) TESTDATAOUT="$(TESTDATAOUT)" TESTDATABLD="$(TESTDATABLD)" 416 417 #invoke pkgdata for ICU common data 418 # pkgdata will drop all output files (.dat, .dll, .lib) into the target (ICUBLD_PKG) directory. 419 # move the .dll and .lib files to their final destination afterwards. 420 # The $(U_ICUDATA_NAME).lib and $(U_ICUDATA_NAME).exp should already be in the right place due to stubdata. 421 # 422 # 2005-may-05 Removed Unicode properties files (unorm.icu, uprops.icu, ucase.icu, ubidi.icu) 423 # from data build. See Jitterbug 4497. (makedata.mak revision 1.117) 424 # 425 !IFDEF ICUDATA_SOURCE_ARCHIVE 426 "$(ICU_LIB_TARGET)" : $(COMMON_ICUDATA_DEPENDENCIES) "$(ICUDATA_SOURCE_ARCHIVE)" 427 @echo Building icu data from $(ICUDATA_SOURCE_ARCHIVE) 428 cd "$(ICUBLD_PKG)" 429 "$(ICUPBIN)\icupkg" -x * --list "$(ICUDATA_SOURCE_ARCHIVE)" > "$(ICUTMP)\icudata.lst" 430 "$(ICUPBIN)\pkgdata" $(COMMON_ICUDATA_ARGUMENTS) "$(ICUTMP)\icudata.lst" 431 copy "$(U_ICUDATA_NAME).dll" "$(DLL_OUTPUT)" 432 -@erase "$(U_ICUDATA_NAME).dll" 433 copy "$(ICUTMP)\$(ICUPKG).dat" "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat" 434 -@erase "$(ICUTMP)\$(ICUPKG).dat" 435 !ELSE 436 "$(ICU_LIB_TARGET)" : $(COMMON_ICUDATA_DEPENDENCIES) $(CNV_FILES) "$(ICUBLD_PKG)\unames.icu" "$(ICUBLD_PKG)\pnames.icu" "$(ICUBLD_PKG)\cnvalias.icu" "$(ICUBLD_PKG)\$(ICUCOL)\ucadata.icu" "$(ICUBLD_PKG)\$(ICUCOL)\invuca.icu" $(BRK_FILES) $(BRK_CTD_FILES) $(BRK_RES_FILES) $(COL_COL_FILES) $(RBNF_RES_FILES) $(TRANSLIT_RES_FILES) $(ALL_RES) $(SPREP_FILES) "$(ICUBLD_PKG)\confusables.cfu" 437 @echo Building icu data 438 cd "$(ICUBLD_PKG)" 439 "$(ICUPBIN)\pkgdata" $(COMMON_ICUDATA_ARGUMENTS) <<"$(ICUTMP)\icudata.lst" 440 pnames.icu 441 unames.icu 442 confusables.cfu 443 $(ICUCOL)\ucadata.icu 444 $(ICUCOL)\invuca.icu 445 cnvalias.icu 446 $(CNV_FILES:.cnv =.cnv 447 ) 448 $(ALL_RES:.res =.res 449 ) 450 $(COL_COL_FILES:.res =.res 451 ) 452 $(RBNF_RES_FILES:.res =.res 453 ) 454 $(TRANSLIT_RES_FILES:.res =.res 455 ) 456 $(BRK_FILES:.brk =.brk 457 ) 458 $(BRK_CTD_FILES:.ctd =.ctd 459 ) 460 $(BRK_RES_FILES:.res =.res 461 ) 462 $(SPREP_FILES:.spp=.spp 463 ) 464 <<KEEP 465 -@erase "$(ICU_LIB_TARGET)" 466 copy "$(U_ICUDATA_NAME).dll" "$(ICU_LIB_TARGET)" 467 -@erase "$(U_ICUDATA_NAME).dll" 468 copy "$(ICUTMP)\$(ICUPKG).dat" "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat" 469 -@erase "$(ICUTMP)\$(ICUPKG).dat" 470 !ENDIF 471 472 # utility target to create missing directories 473 CREATE_DIRS : 474 @if not exist "$(ICUOUT)\$(NULL)" mkdir "$(ICUOUT)" 475 @if not exist "$(ICUTMP)\$(NULL)" mkdir "$(ICUTMP)" 476 @if not exist "$(ICUOUT)\build\$(NULL)" mkdir "$(ICUOUT)\build" 477 @if not exist "$(ICUBLD_PKG)\$(NULL)" mkdir "$(ICUBLD_PKG)" 478 @if not exist "$(ICUBLD_PKG)\$(ICUBRK)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICUBRK)" 479 @if not exist "$(ICUBLD_PKG)\$(ICUCOL)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICUCOL)" 480 @if not exist "$(ICUBLD_PKG)\$(ICURBNF)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICURBNF)" 481 @if not exist "$(ICUBLD_PKG)\$(ICUTRNS)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICUTRNS)" 482 @if not exist "$(TESTDATAOUT)\$(NULL)" mkdir "$(TESTDATAOUT)" 483 @if not exist "$(TESTDATABLD)\$(NULL)" mkdir "$(TESTDATABLD)" 484 @if not exist "$(TESTDATAOUT)\testdata\$(NULL)" mkdir "$(TESTDATAOUT)\testdata" 485 486 # utility target to send us to the right dir 487 GODATA : CREATE_DIRS 488 @cd "$(ICUBLD_PKG)" 489 490 # This is to remove all the data files 491 CLEAN : GODATA 492 @echo Cleaning up the data files. 493 @cd "$(ICUBLD_PKG)" 494 -@erase "*.cnv" 495 -@erase "*.exp" 496 -@erase "*.icu" 497 -@erase "*.lib" 498 -@erase "*.res" 499 -@erase "*.spp" 500 -@erase "*.txt" 501 -@erase "*.cfu" 502 @cd "$(ICUBLD_PKG)\$(ICUBRK)" 503 -@erase "*.brk" 504 -@erase "*.ctd" 505 -@erase "*.res" 506 -@erase "*.txt" 507 @cd "$(ICUBLD_PKG)\$(ICUCOL)" 508 -@erase "*.res" 509 -@erase "*.txt" 510 @cd "$(ICUBLD_PKG)\$(ICURBNF)" 511 -@erase "*.res" 512 -@erase "*.txt" 513 @cd "$(ICUBLD_PKG)\$(ICUTRNS)" 514 -@erase "*.res" 515 @cd "$(ICUOUT)" 516 -@erase "*.dat" 517 @cd "$(ICUTMP)" 518 -@erase "*.html" 519 -@erase "*.lst" 520 -@erase "*.mak" 521 -@erase "*.obj" 522 -@erase "*.res" 523 @cd "$(TESTDATABLD)" 524 -@erase "*.cnv" 525 -@erase "*.icu" 526 -@erase "*.mak" 527 -@erase "*.res" 528 -@erase "*.spp" 529 -@erase "*.txt" 530 @cd "$(TESTDATAOUT)" 531 -@erase "*.dat" 532 @cd "$(TESTDATAOUT)\testdata" 533 -@erase "*.typ" 534 @cd "$(ICUBLD_PKG)" 535 536 537 # RBBI .brk file generation. 538 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)}.txt.brk: 539 @echo Creating $@ 540 @"$(ICUTOOLS)\genbrk\$(CFG)\genbrk" -c -r $< -o $@ -d"$(ICUBLD_PKG)" -i "$(ICUBLD_PKG)" 541 542 # RBBI .ctd file generation. 543 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)}.txt.ctd: 544 @echo Creating $@ 545 @"$(ICUTOOLS)\genctd\$(CFG)\genctd" -c -o $@ -d"$(ICUBLD_PKG)" -i "$(ICUBLD_PKG)" $< 546 547 # Batch inference rule for creating converters 548 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUUCM)}.ucm.cnv:: 549 @echo Making Charset Conversion tables 550 @"$(ICUTOOLS)\makeconv\$(CFG)\makeconv" -c -d"$(ICUBLD_PKG)" $< 551 552 # Batch inference rule for creating miscellaneous resource files 553 # TODO: -q option is specified to squelch the 120+ warnings about 554 # empty intvectors and binary elements. Unfortunately, this may 555 # squelch other legitimate warnings. When there is a better 556 # way, remove the -q. 557 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUMISC2)}.txt.res:: 558 @echo Making Miscellaneous Resource Bundle files 559 @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -q -d"$(ICUBLD_PKG)" $< 560 561 # Inference rule for creating resource bundle files 562 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICULOC)}.txt.res:: 563 @echo Making Locale Resource Bundle files 564 @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -d"$(ICUBLD_PKG)" $< 565 566 res_index.res: 567 @echo Generating <<res_index.txt 568 // Warning this file is automatically generated 569 res_index:table(nofallback) { 570 InstalledLocales { 571 $(GENRB_SOURCE:.txt= {""} 572 ) 573 } 574 } 575 <<KEEP 576 @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -d"$(ICUBLD_PKG)" .\res_index.txt 577 578 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUCOL)}.txt{$(ICUCOL)}.res:: 579 @echo Making Collation files 580 @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICUCOL)" $< 581 582 $(ICUCOL)\res_index.res: 583 @echo Generating <<$(ICUCOL)\res_index.txt 584 // Warning this file is automatically generated 585 res_index:table(nofallback) { 586 InstalledLocales { 587 $(COLLATION_SOURCE:.txt= {""} 588 ) 589 } 590 } 591 <<KEEP 592 @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -d"$(ICUBLD_PKG)\$(ICUCOL)" .\$(ICUCOL)\res_index.txt 593 594 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICURBNF)}.txt{$(ICURBNF)}.res:: 595 @echo Making RBNF files 596 @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICURBNF)" $< 597 598 $(ICURBNF)\res_index.res: 599 @echo Generating <<$(ICURBNF)\res_index.txt 600 // Warning this file is automatically generated 601 res_index:table(nofallback) { 602 InstalledLocales { 603 $(RBNF_SOURCE:.txt= {""} 604 ) 605 } 606 } 607 <<KEEP 608 @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -d"$(ICUBLD_PKG)\$(ICURBNF)" .\$(ICURBNF)\res_index.txt 609 610 $(ICUBRK)\res_index.res: 611 @echo Generating <<$(ICUBRK)\res_index.txt 612 // Warning this file is automatically generated 613 res_index:table(nofallback) { 614 InstalledLocales { 615 $(BRK_RES_SOURCE:.txt= {""} 616 ) 617 } 618 } 619 <<KEEP 620 @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -d"$(ICUBLD_PKG)\$(ICUBRK)" .\$(ICUBRK)\res_index.txt 621 622 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)}.txt{$(ICUBRK)}.res:: 623 @echo Making Break Iterator Resource files 624 @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICUBRK)" $< 625 626 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUTRNS)}.txt{$(ICUTRNS)}.res:: 627 @echo Making Transliterator files 628 @"$(ICUTOOLS)\genrb\$(CFG)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICUTRNS)" $< 629 630 631 # DLL version information 632 # If you modify this, modify winmode.c in pkgdata. 633 "$(ICUTMP)\icudata.res": "$(ICUMISC)\icudata.rc" 634 @echo Creating data DLL version information from $** 635 @rc.exe /i "..\..\..\..\common;..\..\..\..\..\public\common" /r /fo $@ $** 636 637 # Targets for unames.icu 638 "$(ICUBLD_PKG)\unames.icu": "$(ICUUNIDATA)\*.txt" "$(ICUTOOLS)\gennames\$(CFG)\gennames.exe" 639 @echo Creating data file for Unicode Names 640 @"$(ICUTOOLS)\gennames\$(CFG)\gennames" -1 -u $(UNICODE_VERSION) -d "$(ICUBLD_PKG)" "$(ICUUNIDATA)\UnicodeData.txt" 641 642 # Targets for pnames.icu 643 # >> Depends on the Unicode data as well as uchar.h and uscript.h << 644 "$(ICUBLD_PKG)\pnames.icu": "$(ICUUNIDATA)\*.txt" "$(ICUTOOLS)\genpname\$(CFG)\genpname.exe" "$(ICUP)\source\common\unicode\uchar.h" "$(ICUP)\source\common\unicode\uscript.h" 645 @echo Creating data file for Unicode Property Names 646 @"$(ICUTOOLS)\genpname\$(CFG)\genpname" -d "$(ICUBLD_PKG)" 647 648 # Targets for uprops.icu 649 "$(ICUBLD_PKG)\uprops.icu": "$(ICUUNIDATA)\*.txt" "$(ICUTOOLS)\genprops\$(CFG)\genprops.exe" "$(ICUBLD_PKG)\pnames.icu" 650 @echo Creating data file for Unicode Character Properties 651 @"$(ICUTOOLS)\genprops\$(CFG)\genprops" -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUBLD_PKG)" 652 @"$(ICUTOOLS)\genprops\$(CFG)\genprops" --csource -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUTMP)" 653 654 # Targets for ubidi.icu 655 "$(ICUBLD_PKG)\ubidi.icu": "$(ICUUNIDATA)\*.txt" "$(ICUTOOLS)\genbidi\$(CFG)\genbidi.exe" 656 @echo Creating data file for Unicode BiDi/Shaping Properties 657 @"$(ICUTOOLS)\genbidi\$(CFG)\genbidi" -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUBLD_PKG)" 658 @"$(ICUTOOLS)\genbidi\$(CFG)\genbidi" --csource -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUTMP)" 659 660 # Targets for ucase.icu 661 "$(ICUBLD_PKG)\ucase.icu": "$(ICUUNIDATA)\*.txt" "$(ICUTOOLS)\gencase\$(CFG)\gencase.exe" 662 @echo Creating data file for Unicode Case Mapping Properties 663 @"$(ICUTOOLS)\gencase\$(CFG)\gencase" -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUBLD_PKG)" 664 @"$(ICUTOOLS)\gencase\$(CFG)\gencase" --csource -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUTMP)" 665 666 # Targets for unorm.icu 667 "$(ICUBLD_PKG)\unorm.icu": "$(ICUUNIDATA)\*.txt" "$(ICUTOOLS)\gennorm\$(CFG)\gennorm.exe" "$(ICUBLD_PKG)\pnames.icu" "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" 668 @echo Creating data file for Unicode Normalization 669 @"$(ICUTOOLS)\gennorm\$(CFG)\gennorm" -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUBLD_PKG)" 670 @"$(ICUTOOLS)\gennorm\$(CFG)\gennorm" --csource -u $(UNICODE_VERSION) -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" -d "$(ICUTMP)" 671 672 # Targets for converters 673 "$(ICUBLD_PKG)\cnvalias.icu" : {"$(ICUSRCDATA)\$(ICUUCM)"}\convrtrs.txt "$(ICUTOOLS)\gencnval\$(CFG)\gencnval.exe" 674 @echo Creating data file for Converter Aliases 675 @"$(ICUTOOLS)\gencnval\$(CFG)\gencnval" -d "$(ICUBLD_PKG)" "$(ICUSRCDATA)\$(ICUUCM)\convrtrs.txt" 676 677 # Targets for ucadata.icu & invuca.icu 678 # used to depend on "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\unorm.icu" 679 # see Jitterbug 4497 680 "$(ICUBLD_PKG)\$(ICUCOL)\invuca.icu" "$(ICUBLD_PKG)\$(ICUCOL)\ucadata.icu": "$(ICUUNIDATA)\FractionalUCA.txt" "$(ICUTOOLS)\genuca\$(CFG)\genuca.exe" 681 @echo Creating UCA data files 682 @"$(ICUTOOLS)\genuca\$(CFG)\genuca" -d "$(ICUBLD_PKG)\$(ICUCOL)" -i "$(ICUBLD_PKG)" -s "$(ICUUNIDATA)" 683 684 # Stringprep .spp file generation. 685 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUSPREP)}.txt.spp: 686 @echo Creating $@ 687 @"$(ICUTOOLS)\gensprep\$(CFG)\gensprep" -s $(<D) -d "$(ICUBLD_PKG)" -b $(@B) -m "$(ICUUNIDATA)" -u 3.2.0 $(<F) 688 689 # Confusables .cfu file generation 690 # Can't use an inference rule because two .txt source files combine to produce a single .cfu output file 691 "$(ICUBLD_PKG)\confusables.cfu": "$(ICUUNIDATA)\confusables.txt" "$(ICUUNIDATA)\confusablesWholeScript.txt" "$(ICUTOOLS)\gencfu\$(CFG)\gencfu.exe" 692 @echo Creating $@ 693 @"$(ICUTOOLS)\gencfu\$(CFG)\gencfu" -c -r "$(ICUUNIDATA)\confusables.txt" -w "$(ICUUNIDATA)\confusablesWholeScript.txt" -o $@ -i "$(ICUBLD_PKG)" 694 695 !IFDEF ICUDATA_ARCHIVE 696 "$(ICUDATA_SOURCE_ARCHIVE)": CREATE_DIRS $(ICUDATA_ARCHIVE) "$(ICUTOOLS)\icupkg\$(CFG)\icupkg.exe" 697 "$(ICUTOOLS)\icupkg\$(CFG)\icupkg" -t$(U_ICUDATA_ENDIAN_SUFFIX) "$(ICUDATA_ARCHIVE)" "$(ICUDATA_SOURCE_ARCHIVE)" 698 !ENDIF 699 700 # Dependencies on the tools for the batch inference rules 701 702 !IFNDEF ICUDATA_SOURCE_ARCHIVE 703 $(UCM_SOURCE) : {"$(ICUTOOLS)\makeconv\$(CFG)"}makeconv.exe 704 705 # This used to depend on "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\ubidi.icu" "$(ICUBLD_PKG)\unorm.icu" 706 # This data is now hard coded as a part of the library. 707 # See Jitterbug 4497 for details. 708 $(MISC_SOURCE) $(RB_FILES) $(COL_COL_FILES) $(RBNF_RES_FILES) $(BRK_RES_FILES) $(TRANSLIT_RES_FILES): {"$(ICUTOOLS)\genrb\$(CFG)"}genrb.exe "$(ICUBLD_PKG)\$(ICUCOL)\ucadata.icu" 709 710 # This used to depend on "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\ubidi.icu" "$(ICUBLD_PKG)\unorm.icu" 711 # This data is now hard coded as a part of the library. 712 # See Jitterbug 4497 for details. 713 $(BRK_SOURCE) : "$(ICUBLD_PKG)\unames.icu" "$(ICUBLD_PKG)\pnames.icu" 714 !ENDIF 715 716