1 # Copyright (C) 2016 and later: Unicode, Inc. and others. 2 # License & terms of use: http://www.unicode.org/copyright.html 3 #********************************************************************** 4 #* Copyright (C) 1999-2016, International Business Machines Corporation 5 #* and others. All Rights Reserved. 6 #********************************************************************** 7 # nmake file for creating data files on win32 8 # invoke with 9 # nmake /f makedata.mak icumake=$(ProjectDir) 10 # 11 # 12/10/1999 weiv Created 12 13 ############################################################################## 14 # Keep the following in sync with the version - see common/unicode/uvernum.h 15 U_ICUDATA_NAME=icudt60 16 ############################################################################## 17 !IF "$(UWP)" == "UWP" 18 # Optionally change the name of the data file for the UWP version. 19 U_ICUDATA_NAME=icudt60 20 !ENDIF 21 U_ICUDATA_ENDIAN_SUFFIX=l 22 UNICODE_VERSION=10.0 23 ICU_LIB_TARGET=$(DLL_OUTPUT)\$(U_ICUDATA_NAME).dll 24 25 # ICUMAKE 26 # Must be provided by whoever runs this makefile. 27 # Is the directory containing this file (makedata.mak) 28 # Is the directory into which most data is built (prior to packaging) 29 # Is icu\source\data\ 30 # 31 !IF "$(ICUMAKE)"=="" 32 !ERROR Can't find ICUMAKE (ICU Data Make dir, should point to icu\source\data\ )! 33 !ENDIF 34 !MESSAGE ICU data make path is $(ICUMAKE) 35 36 # Suffixes for data files 37 .SUFFIXES : .nrm .icu .ucm .cnv .dll .dat .res .txt .c 38 39 ICUOUT=$(ICUMAKE)\out 40 41 # the prefix "icudt21_" for use in filenames 42 ICUPKG=$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX) 43 44 # need to nuke \\ for .NET... 45 ICUOUT=$(ICUOUT:\\=\) 46 47 ICUBLD=$(ICUOUT)\build 48 ICUBLD_PKG=$(ICUBLD)\$(ICUPKG) 49 ICUTMP=$(ICUOUT)\tmp 50 51 # ICUP 52 # The root of the ICU source directory tree 53 # 54 ICUP=$(ICUMAKE)\..\.. 55 ICUP=$(ICUP:\source\data\..\..=) 56 # In case the first one didn't do it, try this one. .NET would do the second one. 57 ICUP=$(ICUP:\source\data\\..\..=) 58 !MESSAGE ICU root path is $(ICUP) 59 60 61 # ICUSRCDATA 62 # The data directory in source 63 # 64 ICUSRCDATA=$(ICUP)\source\data 65 ICUSRCDATA_RELATIVE_PATH=..\..\.. 66 67 # ICUUCM 68 # The directory that contains ucmcore.mk files along with *.ucm files 69 # 70 ICUUCM=mappings 71 72 # ICULOC 73 # The directory that contains resfiles.mk files along with *.txt locale data files 74 # 75 ICULOC=locales 76 77 # ICUCOL 78 # The directory that contains colfiles.mk files along with *.txt collation data files 79 # 80 ICUCOL=coll 81 82 # ICURBNF 83 # The directory that contains rbnffiles.mk files along with *.txt RBNF data files 84 # 85 ICURBNF=rbnf 86 87 # ICUTRNS 88 # The directory that contains trfiles.mk files along with *.txt transliterator files 89 # 90 ICUTRNS=translit 91 92 # ICUBRK 93 # The directory that contains resfiles.mk files along with *.txt break iterator files 94 # 95 ICUBRK=brkitr 96 97 # ICUUNIDATA 98 # The directory that contains Unicode data files 99 # 100 ICUUNIDATA=$(ICUP)\source\data\unidata 101 102 103 # ICUMISC 104 # The directory that contains miscfiles.mk along with files that are miscelleneous data 105 # 106 ICUMISC=$(ICUP)\source\data\misc 107 ICUMISC2=misc 108 109 # ICUSPREP 110 # The directory that contains sprepfiles.mk files along with *.txt stringprep files 111 # 112 ICUSPREP=sprep 113 114 # 115 # ICUDATA 116 # The source directory. Contains the source files for the common data to be built. 117 # WARNING: NOT THE SAME AS ICU_DATA environment variable. Confusing. 118 ICUDATA=$(ICUP)\source\data 119 120 # 121 # DLL_OUTPUT 122 # Destination directory for the common data DLL file. 123 # This is the same place that all of the other ICU DLLs go (the code-containing DLLs) 124 # The lib file for the data DLL goes in $(DLL_OUTPUT)/../lib/ 125 # 126 !IF "$(CFG)" == "ARM\Release" || "$(CFG)" == "ARM\Debug" 127 DLL_OUTPUT=$(ICUP)\binARM$(UWP) 128 !ELSE IF "$(CFG)" == "x64\Release" || "$(CFG)" == "x64\Debug" 129 DLL_OUTPUT=$(ICUP)\bin64$(UWP) 130 !ELSE IF "$(UWP)" == "UWP" 131 DLL_OUTPUT=$(ICUP)\bin32$(UWP) 132 !ELSE 133 DLL_OUTPUT=$(ICUP)\bin$(UWP) 134 !ENDIF 135 136 # 137 # TESTDATA 138 # The source directory for data needed for test programs. 139 TESTDATA=$(ICUP)\source\test\testdata 140 141 # 142 # TESTDATAOUT 143 # The destination directory for the built test data .dat file 144 TESTDATAOUT=$(ICUP)\source\test\testdata\out 145 146 # 147 # TESTDATABLD 148 # The build directory for test data intermidiate files 149 # (Tests are NOT run from this makefile, 150 # only the data is put in place.) 151 TESTDATABLD=$(ICUP)\source\test\testdata\out\build 152 153 # 154 # ICUTOOLS 155 # Directory under which all of the ICU data building tools live. 156 # 157 ICUTOOLS=$(ICUP)\source\tools 158 !MESSAGE ICU tools path is $(ICUTOOLS) 159 160 # 161 # TOOLS CFG PATH 162 # ARM needs to use one of the other tools, so make sure to get an usable cfg path 163 # Since tools, particularly pkggen, have architecture built-in, we made x64 on 164 # Windows be machine-independent and use those tools. 165 # 166 CFGTOOLS=$(CFG) 167 !IF "$(CFG)" == "ARM\Release" || "$(CFG)" == "ARM\Debug" 168 CFGTOOLS=x64\Release 169 !ENDIF 170 !MESSAGE ICU tools CFG subpath is $(CFGTOOLS) 171 172 # The current ICU tools need to be in the path first. 173 # x86 uses x86, x64 and arm use x64 174 !IF "$(CFG)" == "x86\Release" || "$(CFG)" == "x86\Debug" 175 PATH = $(ICUP)\bin;$(PATH) 176 ICUPBIN=$(ICUP)\bin 177 !ELSE 178 PATH = $(ICUP)\bin64;$(PATH) 179 ICUPBIN=$(ICUP)\bin64 180 !ENDIF 181 182 183 # This variable can be overridden to "-m static" by the project settings, 184 # if you want a static data library. 185 !IF "$(ICU_PACKAGE_MODE)"=="" 186 ICU_PACKAGE_MODE=-m dll 187 !ENDIF 188 189 # If this archive exists, build from that 190 # instead of building everything from scratch. 191 ICUDATA_SOURCE_ARCHIVE=$(ICUSRCDATA)\in\$(ICUPKG).dat 192 !IF !EXISTS("$(ICUDATA_SOURCE_ARCHIVE)") 193 # Does a big endian version exist either? 194 ICUDATA_ARCHIVE=$(ICUSRCDATA)\in\$(U_ICUDATA_NAME)b.dat 195 !IF EXISTS("$(ICUDATA_ARCHIVE)") 196 ICUDATA_SOURCE_ARCHIVE=$(ICUTMP)\$(ICUPKG).dat 197 !ELSE 198 # Nothing was usable for input 199 !UNDEF ICUDATA_SOURCE_ARCHIVE 200 !ENDIF 201 !ENDIF 202 203 !IFDEF ICUDATA_SOURCE_ARCHIVE 204 !MESSAGE ICU data source archive is $(ICUDATA_SOURCE_ARCHIVE) 205 !ELSE 206 # We're including a list of .ucm files. 207 # There are several lists, they are all optional. 208 209 # Always build the mapping files for the EBCDIC fallback codepages 210 # They are necessary on EBCDIC machines, and 211 # the following logic is much easier if UCM_SOURCE is never empty. 212 # (They are small.) 213 UCM_SOURCE=ibm-37_P100-1995.ucm ibm-1047_P100-1995.ucm 214 215 !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmcore.mk") 216 !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmcore.mk" 217 UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_CORE) 218 !ELSE 219 !MESSAGE Warning: cannot find "ucmcore.mk". Not building core MIME/Unix/Windows converter files. 220 !ENDIF 221 222 !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmfiles.mk") 223 !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmfiles.mk" 224 UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_FILES) 225 !ELSE 226 !MESSAGE Warning: cannot find "ucmfiles.mk". Not building many converter files. 227 !ENDIF 228 229 !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmebcdic.mk") 230 !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmebcdic.mk" 231 UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_EBCDIC) 232 !IFDEF UCM_SOURCE_EBCDIC_IGNORE_SISO 233 BUILD_SPECIAL_CNV_FILES=YES 234 UCM_SOURCE_SPECIAL=$(UCM_SOURCE_EBCDIC_IGNORE_SISO) 235 !ELSE 236 !UNDEF BUILD_SPECIAL_CNV_FILES 237 !ENDIF 238 !ELSE 239 !MESSAGE Warning: cannot find "ucmebcdic.mk". Not building EBCDIC converter files. 240 !ENDIF 241 242 !IF EXISTS("$(ICUSRCDATA)\$(ICUUCM)\ucmlocal.mk") 243 !INCLUDE "$(ICUSRCDATA)\$(ICUUCM)\ucmlocal.mk" 244 !IFDEF UCM_SOURCE_LOCAL 245 UCM_SOURCE=$(UCM_SOURCE) $(UCM_SOURCE_LOCAL) 246 !ENDIF 247 !IFDEF UCM_SOURCE_EBCDIC_IGNORE_SISO_LOCAL 248 UCM_SOURCE_SPECIAL=$(UCM_SOURCE_SPECIAL) $(UCM_SOURCE_EBCDIC_IGNORE_SISO_LOCAL) 249 BUILD_SPECIAL_CNV_FILES=YES 250 !ENDIF 251 !ELSE 252 !MESSAGE Information: cannot find "ucmlocal.mk". Not building user-additional converter files. 253 !ENDIF 254 255 CNV_FILES=$(UCM_SOURCE:.ucm=.cnv) 256 !IFDEF BUILD_SPECIAL_CNV_FILES 257 CNV_FILES_SPECIAL=$(UCM_SOURCE_SPECIAL:.ucm=.cnv) 258 !ENDIF 259 260 !IF EXISTS("$(ICUSRCDATA)\$(ICUBRK)\brkfiles.mk") 261 !INCLUDE "$(ICUSRCDATA)\$(ICUBRK)\brkfiles.mk" 262 !IF EXISTS("$(ICUSRCDATA)\$(ICUBRK)\brklocal.mk") 263 !INCLUDE "$(ICUSRCDATA)\$(ICUBRK)\brklocal.mk" 264 !IFDEF BRK_SOURCE_LOCAL 265 BRK_SOURCE=$(BRK_SOURCE) $(BRK_SOURCE_LOCAL) 266 !ENDIF 267 !IFDEF BRK_DICT_SOURCE_LOCAL 268 BRK_DICT_SOURCE=$(BRK_DICT_SOURCE) $(BRK_DICT_SOURCE_LOCAL) 269 !ENDIF 270 !IFDEF BRK_RES_SOURCE_LOCAL 271 BRK_RES_SOURCE=$(BRK_RES_SOURCE) $(BRK_RES_SOURCE_LOCAL) 272 !ENDIF 273 !ELSE 274 !MESSAGE Information: cannot find "brklocal.mk". Not building user-additional break iterator files. 275 !ENDIF 276 !ELSE 277 !MESSAGE Warning: cannot find "brkfiles.mk" 278 !ENDIF 279 280 # 281 # Break iterator data files. 282 # 283 BRK_FILES=$(ICUBRK)\$(BRK_SOURCE:.txt =.brk brkitr\) 284 BRK_FILES=$(BRK_FILES:.txt=.brk) 285 BRK_FILES=$(BRK_FILES:brkitr\ =brkitr\) 286 287 !IFDEF BRK_DICT_SOURCE 288 BRK_DICT_FILES = $(ICUBRK)\$(BRK_DICT_SOURCE:.txt =.dict brkitr\) 289 BRK_DICT_FILES = $(BRK_DICT_FILES:.txt=.dict) 290 BRK_DICT_FILES = $(BRK_DICT_FILES:brkitr\ =brkitr\) 291 !ENDIF 292 293 !IFDEF BRK_RES_SOURCE 294 BRK_RES_FILES = $(BRK_RES_SOURCE:.txt =.res brkitr\) 295 BRK_RES_FILES = $(BRK_RES_FILES:.txt=.res) 296 BRK_RES_FILES = $(ICUBRK)\root.res $(ICUBRK)\$(BRK_RES_FILES:brkitr\ =) 297 ALL_RES = $(ALL_RES) $(ICUBRK)\res_index.res 298 !ENDIF 299 300 # Read list of locale resource bundle files 301 !IF EXISTS("$(ICUSRCDATA)\$(ICULOC)\resfiles.mk") 302 !INCLUDE "$(ICUSRCDATA)\$(ICULOC)\resfiles.mk" 303 !IF EXISTS("$(ICUSRCDATA)\$(ICULOC)\reslocal.mk") 304 !INCLUDE "$(ICUSRCDATA)\$(ICULOC)\reslocal.mk" 305 !IFDEF GENRB_SOURCE_LOCAL 306 GENRB_SOURCE=$(GENRB_SOURCE) $(GENRB_SOURCE_LOCAL) 307 !ENDIF 308 !ELSE 309 !MESSAGE Information: cannot find "reslocal.mk". Not building user-additional resource bundle files. 310 !ENDIF 311 !ELSE 312 !MESSAGE Warning: cannot find "resfiles.mk" 313 !ENDIF 314 315 !IFDEF GENRB_SOURCE 316 RB_FILES = root.res pool.res $(GENRB_ALIAS_SOURCE:.txt=.res) $(GENRB_ALIAS_SOURCE_LOCAL:.txt=.res) $(GENRB_SOURCE:.txt=.res) 317 ALL_RES = $(ALL_RES) res_index.res 318 !ENDIF 319 320 321 # Read the list of currency display name resource bundle files 322 !IF EXISTS("$(ICUSRCDATA)\curr\resfiles.mk") 323 !INCLUDE "$(ICUSRCDATA)\curr\resfiles.mk" 324 !IF EXISTS("$(ICUSRCDATA)\curr\reslocal.mk") 325 !INCLUDE "$(ICUSRCDATA)\curr\reslocal.mk" 326 !IFDEF CURR_SOURCE_LOCAL 327 CURR_SOURCE=$(CURR_SOURCE) $(CURR_SOURCE_LOCAL) 328 !ENDIF 329 !ELSE 330 !MESSAGE Information: cannot find "curr\reslocal.mk". Not building user-additional resource bundle files. 331 !ENDIF 332 !ELSE 333 !MESSAGE Warning: cannot find "curr\resfiles.mk" 334 !ENDIF 335 336 !IFDEF CURR_SOURCE 337 CURR_FILES = curr\root.txt supplementalData.txt $(CURR_ALIAS_SOURCE) $(CURR_SOURCE) 338 CURR_RES_FILES = $(CURR_FILES:.txt =.res curr\) 339 CURR_RES_FILES = $(CURR_RES_FILES:.txt=.res) 340 CURR_RES_FILES = curr\pool.res $(CURR_RES_FILES:curr\ =curr\) 341 ALL_RES = $(ALL_RES) curr\res_index.res 342 !ENDIF 343 344 # Read the list of language/script display name resource bundle files 345 !IF EXISTS("$(ICUSRCDATA)\lang\resfiles.mk") 346 !INCLUDE "$(ICUSRCDATA)\lang\resfiles.mk" 347 !IF EXISTS("$(ICUSRCDATA)\lang\reslocal.mk") 348 !INCLUDE "$(ICUSRCDATA)\lang\reslocal.mk" 349 !IFDEF LANG_SOURCE_LOCAL 350 LANG_SOURCE=$(LANG_SOURCE) $(LANG_SOURCE_LOCAL) 351 !ENDIF 352 !ELSE 353 !MESSAGE Information: cannot find "lang\reslocal.mk". Not building user-additional resource bundle files. 354 !ENDIF 355 !ELSE 356 !MESSAGE Warning: cannot find "lang\resfiles.mk" 357 !ENDIF 358 359 !IFDEF LANG_SOURCE 360 LANG_FILES = lang\root.txt $(LANG_ALIAS_SOURCE) $(LANG_SOURCE) 361 LANG_RES_FILES = $(LANG_FILES:.txt =.res lang\) 362 LANG_RES_FILES = $(LANG_RES_FILES:.txt=.res) 363 LANG_RES_FILES = lang\pool.res $(LANG_RES_FILES:lang\ =lang\) 364 ALL_RES = $(ALL_RES) lang\res_index.res 365 !ENDIF 366 367 # Read the list of region display name resource bundle files 368 !IF EXISTS("$(ICUSRCDATA)\region\resfiles.mk") 369 !INCLUDE "$(ICUSRCDATA)\region\resfiles.mk" 370 !IF EXISTS("$(ICUSRCDATA)\region\reslocal.mk") 371 !INCLUDE "$(ICUSRCDATA)\region\reslocal.mk" 372 !IFDEF REGION_SOURCE_LOCAL 373 REGION_SOURCE=$(REGION_SOURCE) $(REGION_SOURCE_LOCAL) 374 !ENDIF 375 !ELSE 376 !MESSAGE Information: cannot find "region\reslocal.mk". Not building user-additional resource bundle files. 377 !ENDIF 378 !ELSE 379 !MESSAGE Warning: cannot find "region\resfiles.mk" 380 !ENDIF 381 382 !IFDEF REGION_SOURCE 383 REGION_FILES = region\root.txt $(REGION_ALIAS_SOURCE) $(REGION_SOURCE) 384 REGION_RES_FILES = $(REGION_FILES:.txt =.res region\) 385 REGION_RES_FILES = $(REGION_RES_FILES:.txt=.res) 386 REGION_RES_FILES = region\pool.res $(REGION_RES_FILES:region\ =region\) 387 ALL_RES = $(ALL_RES) region\res_index.res 388 !ENDIF 389 390 # Read the list of time zone display name resource bundle files 391 !IF EXISTS("$(ICUSRCDATA)\zone\resfiles.mk") 392 !INCLUDE "$(ICUSRCDATA)\zone\resfiles.mk" 393 !IF EXISTS("$(ICUSRCDATA)\zone\reslocal.mk") 394 !INCLUDE "$(ICUSRCDATA)\zone\reslocal.mk" 395 !IFDEF ZONE_SOURCE_LOCAL 396 ZONE_SOURCE=$(ZONE_SOURCE) $(ZONE_SOURCE_LOCAL) 397 !ENDIF 398 !ELSE 399 !MESSAGE Information: cannot find "zone\reslocal.mk". Not building user-additional resource bundle files. 400 !ENDIF 401 ZONE_SOURCE=$(ZONE_SOURCE) tzdbNames.txt 402 !ELSE 403 !MESSAGE Warning: cannot find "zone\resfiles.mk" 404 !ENDIF 405 406 !IFDEF ZONE_SOURCE 407 ZONE_FILES = zone\root.txt $(ZONE_ALIAS_SOURCE) $(ZONE_SOURCE) 408 ZONE_RES_FILES = $(ZONE_FILES:.txt =.res zone\) 409 ZONE_RES_FILES = $(ZONE_RES_FILES:.txt=.res) 410 ZONE_RES_FILES = zone\pool.res $(ZONE_RES_FILES:zone\ =zone\) 411 ALL_RES = $(ALL_RES) zone\res_index.res 412 !ENDIF 413 414 # Read the list of units display name resource bundle files 415 !IF EXISTS("$(ICUSRCDATA)\unit\resfiles.mk") 416 !INCLUDE "$(ICUSRCDATA)\unit\resfiles.mk" 417 !IF EXISTS("$(ICUSRCDATA)\unit\reslocal.mk") 418 !INCLUDE "$(ICUSRCDATA)\unit\reslocal.mk" 419 !IFDEF UNIT_SOURCE_LOCAL 420 UNIT_SOURCE=$(UNIT_SOURCE) $(UNIT_SOURCE_LOCAL) 421 !ENDIF 422 !ELSE 423 !MESSAGE Information: cannot find "unit\reslocal.mk". Not building user-additional resource bundle files. 424 !ENDIF 425 !ELSE 426 !MESSAGE Warning: cannot find "unit\resfiles.mk" 427 !ENDIF 428 429 !IFDEF UNIT_SOURCE 430 UNIT_FILES = unit\root.txt $(UNIT_ALIAS_SOURCE) $(UNIT_SOURCE) 431 UNIT_RES_FILES = $(UNIT_FILES:.txt =.res unit\) 432 UNIT_RES_FILES = $(UNIT_RES_FILES:.txt=.res) 433 UNIT_RES_FILES = unit\pool.res $(UNIT_RES_FILES:unit\ =unit\) 434 ALL_RES = $(ALL_RES) unit\res_index.res 435 !ENDIF 436 437 # Read the list of collation resource bundle files 438 !IF EXISTS("$(ICUSRCDATA)\$(ICUCOL)\colfiles.mk") 439 !INCLUDE "$(ICUSRCDATA)\$(ICUCOL)\colfiles.mk" 440 !IF EXISTS("$(ICUSRCDATA)\$(ICUCOL)\collocal.mk") 441 !INCLUDE "$(ICUSRCDATA)\$(ICUCOL)\collocal.mk" 442 !IFDEF COLLATION_SOURCE_LOCAL 443 COLLATION_SOURCE=$(COLLATION_SOURCE) $(COLLATION_SOURCE_LOCAL) 444 !ENDIF 445 !ELSE 446 !MESSAGE Information: cannot find "collocal.mk". Not building user-additional resource bundle files. 447 !ENDIF 448 !ELSE 449 !MESSAGE Warning: cannot find "colfiles.mk" 450 !ENDIF 451 452 !IFDEF COLLATION_SOURCE 453 COL_FILES = $(ICUCOL)\root.txt $(COLLATION_ALIAS_SOURCE) $(COLLATION_SOURCE) 454 COL_COL_FILES = $(COL_FILES:.txt =.res coll\) 455 COL_COL_FILES = $(COL_COL_FILES:.txt=.res) 456 COL_COL_FILES = $(COL_COL_FILES:coll\ =) 457 ALL_RES = $(ALL_RES) $(ICUCOL)\res_index.res 458 !ENDIF 459 460 # Read the list of RBNF resource bundle files 461 !IF EXISTS("$(ICUSRCDATA)\$(ICURBNF)\rbnffiles.mk") 462 !INCLUDE "$(ICUSRCDATA)\$(ICURBNF)\rbnffiles.mk" 463 !IF EXISTS("$(ICUSRCDATA)\$(ICURBNF)\rbnflocal.mk") 464 !INCLUDE "$(ICUSRCDATA)\$(ICURBNF)\rbnflocal.mk" 465 !IFDEF RBNF_SOURCE_LOCAL 466 RBNF_SOURCE=$(RBNF_SOURCE) $(RBNF_SOURCE_LOCAL) 467 !ENDIF 468 !ELSE 469 !MESSAGE Information: cannot find "rbnflocal.mk". Not building user-additional resource bundle files. 470 !ENDIF 471 !ELSE 472 !MESSAGE Warning: cannot find "rbnffiles.mk" 473 !ENDIF 474 475 !IFDEF RBNF_SOURCE 476 RBNF_FILES = $(ICURBNF)\root.txt $(RBNF_ALIAS_SOURCE) $(RBNF_SOURCE) 477 RBNF_RES_FILES = $(RBNF_FILES:.txt =.res rbnf\) 478 RBNF_RES_FILES = $(RBNF_RES_FILES:.txt=.res) 479 RBNF_RES_FILES = $(RBNF_RES_FILES:rbnf\ =rbnf\) 480 ALL_RES = $(ALL_RES) $(ICURBNF)\res_index.res 481 !ENDIF 482 483 # Read the list of transliterator resource bundle files 484 !IF EXISTS("$(ICUSRCDATA)\$(ICUTRNS)\trnsfiles.mk") 485 !INCLUDE "$(ICUSRCDATA)\$(ICUTRNS)\trnsfiles.mk" 486 !IF EXISTS("$(ICUSRCDATA)\$(ICUTRNS)\trnslocal.mk") 487 !INCLUDE "$(ICUSRCDATA)\$(ICUTRNS)\trnslocal.mk" 488 !IFDEF TRANSLIT_SOURCE_LOCAL 489 TRANSLIT_SOURCE=$(TRANSLIT_SOURCE) $(TRANSLIT_SOURCE_LOCAL) 490 !ENDIF 491 !ELSE 492 !MESSAGE Information: cannot find "trnslocal.mk". Not building user-additional transliterator files. 493 !ENDIF 494 !ELSE 495 !MESSAGE Warning: cannot find "trnsfiles.mk" 496 !ENDIF 497 498 !IFDEF TRANSLIT_SOURCE 499 TRANSLIT_FILES = $(ICUTRNS)\$(TRANSLIT_ALIAS_SOURCE) $(TRANSLIT_SOURCE) 500 TRANSLIT_RES_FILES = $(TRANSLIT_FILES:.txt =.res translit\) 501 TRANSLIT_RES_FILES = $(TRANSLIT_RES_FILES:.txt=.res) 502 TRANSLIT_RES_FILES = $(TRANSLIT_RES_FILES:translit\ =translit\) 503 #ALL_RES = $(ALL_RES) $(ICUTRNS)\res_index.res 504 !ENDIF 505 506 # Read the list of miscellaneous resource bundle files 507 !IF EXISTS("$(ICUSRCDATA)\$(ICUMISC2)\miscfiles.mk") 508 !INCLUDE "$(ICUSRCDATA)\$(ICUMISC2)\miscfiles.mk" 509 !IF EXISTS("$(ICUSRCDATA)\$(ICUMISC2)\misclocal.mk") 510 !INCLUDE "$(ICUSRCDATA)\$(ICUMISC2)\misclocal.mk" 511 !IFDEF MISC_SOURCE_LOCAL 512 MISC_SOURCE=$(MISC_SOURCE) $(MISC_SOURCE_LOCAL) 513 !ENDIF 514 !ELSE 515 !MESSAGE Information: cannot find "misclocal.mk". Not building user-additional miscellaenous files. 516 !ENDIF 517 !ELSE 518 !MESSAGE Warning: cannot find "miscfiles.mk" 519 !ENDIF 520 521 MISC_FILES = $(MISC_SOURCE:.txt=.res) 522 523 # don't include COL_FILES 524 ALL_RES = $(ALL_RES) $(RB_FILES) $(MISC_FILES) 525 !ENDIF 526 527 # Read the list of stringprep profile files 528 !IF EXISTS("$(ICUSRCDATA)\$(ICUSPREP)\sprepfiles.mk") 529 !INCLUDE "$(ICUSRCDATA)\$(ICUSPREP)\sprepfiles.mk" 530 !IF EXISTS("$(ICUSRCDATA)\$(ICUSPREP)\spreplocal.mk") 531 !INCLUDE "$(ICUSRCDATA)\$(ICUSPREP)\spreplocal.mk" 532 !IFDEF SPREP_SOURCE_LOCAL 533 SPREP_SOURCE=$(SPREP_SOURCE) $(SPREP_SOURCE_LOCAL) 534 !ENDIF 535 !ELSE 536 !MESSAGE Information: cannot find "spreplocal.mk". Not building user-additional stringprep files. 537 !ENDIF 538 !ELSE 539 !MESSAGE Warning: cannot find "sprepfiles.mk" 540 !ENDIF 541 542 SPREP_FILES = $(SPREP_SOURCE:.txt=.spp) 543 544 # Common defines for both ways of building ICU's data library. 545 COMMON_ICUDATA_DEPENDENCIES="$(ICUPBIN)\pkgdata.exe" "$(ICUTMP)\icudata.res" "$(ICUP)\source\stubdata\stubdatabuilt.txt" 546 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 . 547 !IF "$(UWP)" == "UWP" 548 COMMON_ICUDATA_ARGUMENTS=$(COMMON_ICUDATA_ARGUMENTS) -u 549 !IF "$(CFG)" == "ARM\Release" || "$(CFG)" == "ARM\Debug" 550 COMMON_ICUDATA_ARGUMENTS=$(COMMON_ICUDATA_ARGUMENTS) -a 551 !ENDIF 552 !ENDIF 553 554 ############################################################################# 555 # 556 # ALL 557 # This target builds all the data files. The world starts here. 558 # Note: we really want the common data dll to go to $(DLL_OUTPUT), not $(ICUBLD_PKG). But specifying 559 # that here seems to cause confusion with the building of the stub library of the same name. 560 # Building the common dll in $(ICUBLD_PKG) unconditionally copies it to $(DLL_OUTPUT) too. 561 # 562 ############################################################################# 563 ALL : GODATA "$(ICU_LIB_TARGET)" "$(TESTDATAOUT)\testdata.dat" 564 @echo All targets are up to date 565 566 !IF "$(UWP)" == "UWP" 567 @if not exist "$(ICUMAKE)\..\..\commondata\" mkdir "$(ICUMAKE)\..\..\commondata\" 568 copy "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat" "$(ICUMAKE)\..\..\commondata\" 569 !ENDIF 570 571 # The core Unicode properties files (uprops.icu, ucase.icu, ubidi.icu) 572 # are hardcoded in the common DLL and therefore not included in the data package any more. 573 # They are not built by default but need to be built for ICU4J data and for getting the .c source files 574 # when updating the Unicode data. 575 # Changed in makedata.mak revision 1.117. See Jitterbug 4497. 576 # 2010-dec Removed pnames.icu. 577 # Command line: 578 # 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 579 uni-core-data: GODATA "$(ICUBLD_PKG)\pnames.icu" "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\ubidi.icu" "$(ICUBLD_PKG)\nfc.nrm" 580 @echo Unicode .icu files built to "$(ICUBLD_PKG)" 581 582 # Build the ICU4J icudata.jar and testdata.jar. 583 # see icu4j-readme.txt 584 585 ICU4J_TZDATA="$(ICUOUT)\icu4j\icutzdata.jar" 586 ICU4J_DATA_DIRNAME=com\ibm\icu\impl\data\$(U_ICUDATA_NAME)b 587 ICU4J_TZDATA_PATHS=$(ICU4J_DATA_DIRNAME)\zoneinfo64.res $(ICU4J_DATA_DIRNAME)\metaZones.res $(ICU4J_DATA_DIRNAME)\timezoneTypes.res $(ICU4J_DATA_DIRNAME)\windowsZones.res 588 589 generate-data: GODATA "$(ICUOUT)\$(ICUPKG).dat" uni-core-data 590 if not exist "$(ICUOUT)\icu4j\$(ICU4J_DATA_DIRNAME)" mkdir "$(ICUOUT)\icu4j\$(ICU4J_DATA_DIRNAME)" 591 if not exist "$(ICUOUT)\icu4j\tzdata\$(ICU4J_DATA_DIRNAME)" mkdir "$(ICUOUT)\icu4j\tzdata\$(ICU4J_DATA_DIRNAME)" 592 echo pnames.icu ubidi.icu ucase.icu uprops.icu nfc.nrm > "$(ICUOUT)\icu4j\add.txt" 593 "$(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)" 594 @for %f in ($(ICU4J_TZDATA_PATHS)) do @move "$(ICUOUT)\icu4j\%f" "$(ICUOUT)\icu4j\tzdata\$(ICU4J_DATA_DIRNAME)" 595 596 "$(ICUOUT)\icu4j\icutzdata.jar": GODATA generate-data 597 "$(JAR)" cf "$(ICUOUT)\icu4j\icutzdata.jar" -C "$(ICUOUT)\icu4j\tzdata" "$(ICU4J_DATA_DIRNAME)" 598 599 # Build icudata.jar: 600 # - add the uni-core-data to the ICU package 601 # - swap the ICU data 602 # - extract all data items 603 # - package them into the .jar file 604 "$(ICUOUT)\icu4j\icudata.jar": GODATA generate-data 605 "$(JAR)" cf "$(ICUOUT)\icu4j\icudata.jar" -C "$(ICUOUT)\icu4j" "$(ICU4J_DATA_DIRNAME)" 606 607 # Build testdata.jar: 608 # - swap the test data 609 # - extract all data items 610 # - package them into the .jar file 611 "$(ICUOUT)\icu4j\testdata.jar": GODATA "$(TESTDATAOUT)\testdata.dat" 612 if not exist "$(ICUOUT)\icu4j\com\ibm\icu\dev\data\testdata" mkdir "$(ICUOUT)\icu4j\com\ibm\icu\dev\data\testdata" 613 "$(ICUPBIN)\icupkg" "$(TESTDATAOUT)\testdata.dat" -r test.icu -x * -tb -d "$(ICUOUT)\icu4j\com\ibm\icu\dev\data\testdata" 614 "$(JAR)" cf "$(ICUOUT)\icu4j\testdata.jar" -C "$(ICUOUT)\icu4j" com\ibm\icu\dev\data\testdata 615 616 ## Compare to: source\data\Makefile.in and source\test\testdata\Makefile.in 617 618 DEBUGUTILITIESDATA_DIR=main\tests\core\src\com\ibm\icu\dev\test\util 619 DEBUGUTILITIESDATA_SRC=DebugUtilitiesData.java 620 621 # Build DebugUtilitiesData.java 622 "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" : {"$(ICUTOOLS)\gentest\$(CFGTOOLS)"}gentest.exe 623 if not exist "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)" mkdir "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)" 624 "$(ICUTOOLS)\gentest\$(CFGTOOLS)\gentest" -j -d"$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)" 625 626 ICU4J_DATA="$(ICUOUT)\icu4j\icudata.jar" "$(ICUOUT)\icu4j\testdata.jar" "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" 627 628 icu4j-data: GODATA $(ICU4J_DATA) $(ICU4J_TZDATA) 629 630 !IFDEF ICU4J_ROOT 631 632 "$(ICU4J_ROOT)\main\shared\data\icudata.jar": "$(ICUOUT)\icu4j\icudata.jar" 633 if not exist "$(ICU4J_ROOT)\main\shared\data" mkdir "$(ICU4J_ROOT)\main\shared\data" 634 copy "$(ICUOUT)\icu4j\icudata.jar" "$(ICU4J_ROOT)\main\shared\data" 635 636 "$(ICU4J_ROOT)\main\shared\data\icutzdata.jar": "$(ICUOUT)\icu4j\icutzdata.jar" 637 if not exist "$(ICU4J_ROOT)\main\shared\data" mkdir "$(ICU4J_ROOT)\main\shared\data" 638 copy "$(ICUOUT)\icu4j\icutzdata.jar" "$(ICU4J_ROOT)\main\shared\data" 639 640 "$(ICU4J_ROOT)\main\shared\data\testdata.jar": "$(ICUOUT)\icu4j\testdata.jar" 641 if not exist "$(ICU4J_ROOT)\main\shared\data" mkdir "$(ICU4J_ROOT)\main\shared\data" 642 copy "$(ICUOUT)\icu4j\testdata.jar" "$(ICU4J_ROOT)\main\shared\data" 643 644 # "$(DEBUGUTILTIESDATA_OUT)" 645 646 "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)": "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" 647 if not exist "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)" mkdir "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)" 648 copy "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" 649 650 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)" 651 652 icu4j-data-install : GODATA $(ICU4J_DATA) $(ICU4J_TZDATA) $(ICU4J_DATA_INSTALLED) 653 @echo ICU4J data output to "$(ICU4J_ROOT)" 654 655 !ELSE 656 657 icu4j-data-install : 658 @echo ERROR ICU4J_ROOT not set 659 @exit 1 660 661 !ENDIF 662 663 664 665 # 666 # testdata - nmake will invoke pkgdata, which will create testdata.dat 667 # 668 "$(TESTDATAOUT)\testdata.dat": "$(TESTDATA)\*" "$(ICUBLD_PKG)\$(ICUCOL)\ucadata.icu" $(TRANSLIT_RES_FILES) $(MISC_FILES) $(RB_FILES) {"$(ICUTOOLS)\genrb\$(CFGTOOLS)"}genrb.exe 669 @cd "$(TESTDATA)" 670 @echo building testdata... 671 nmake /nologo /f "$(TESTDATA)\testdata.mak" TESTDATA=. ICUTOOLS="$(ICUTOOLS)" ICUPBIN="$(ICUPBIN)" ICUP="$(ICUP)" CFG=$(CFGTOOLS) TESTDATAOUT="$(TESTDATAOUT)" TESTDATABLD="$(TESTDATABLD)" 672 673 #invoke pkgdata for ICU common data 674 # pkgdata will drop all output files (.dat, .dll, .lib) into the target (ICUBLD_PKG) directory. 675 # move the .dll and .lib files to their final destination afterwards. 676 # The $(U_ICUDATA_NAME).lib and $(U_ICUDATA_NAME).exp should already be in the right place due to stubdata. 677 # 678 # 2005-may-05 Removed Unicode properties files (unorm.icu, uprops.icu, ucase.icu, ubidi.icu) 679 # from data build. See Jitterbug 4497. (makedata.mak revision 1.117) 680 # 681 !IFDEF ICUDATA_SOURCE_ARCHIVE 682 "$(ICU_LIB_TARGET)" : $(COMMON_ICUDATA_DEPENDENCIES) "$(ICUDATA_SOURCE_ARCHIVE)" 683 @echo Building icu data from $(ICUDATA_SOURCE_ARCHIVE) 684 cd "$(ICUBLD_PKG)" 685 "$(ICUPBIN)\icupkg" -x * --list "$(ICUDATA_SOURCE_ARCHIVE)" > "$(ICUTMP)\icudata.lst" 686 "$(ICUPBIN)\pkgdata" $(COMMON_ICUDATA_ARGUMENTS) "$(ICUTMP)\icudata.lst" 687 copy "$(U_ICUDATA_NAME).dll" "$(DLL_OUTPUT)" 688 -@erase "$(U_ICUDATA_NAME).dll" 689 copy "$(ICUTMP)\$(ICUPKG).dat" "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat" 690 -@erase "$(ICUTMP)\$(ICUPKG).dat" 691 !ELSE 692 "$(ICU_LIB_TARGET)" : $(COMMON_ICUDATA_DEPENDENCIES) $(CNV_FILES) $(CNV_FILES_SPECIAL) "$(ICUBLD_PKG)\unames.icu" "$(ICUBLD_PKG)\cnvalias.icu" "$(ICUBLD_PKG)\nfkc.nrm" "$(ICUBLD_PKG)\nfkc_cf.nrm" "$(ICUBLD_PKG)\uts46.nrm" "$(ICUBLD_PKG)\$(ICUCOL)\ucadata.icu" $(CURR_RES_FILES) $(LANG_RES_FILES) $(REGION_RES_FILES) $(ZONE_RES_FILES) $(UNIT_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" 693 @echo Building icu data 694 cd "$(ICUBLD_PKG)" 695 "$(ICUPBIN)\pkgdata" $(COMMON_ICUDATA_ARGUMENTS) <<"$(ICUTMP)\icudata.lst" 696 unames.icu 697 confusables.cfu 698 $(ICUCOL)\ucadata.icu 699 cnvalias.icu 700 nfkc.nrm 701 nfkc_cf.nrm 702 uts46.nrm 703 $(CNV_FILES:.cnv =.cnv 704 ) 705 $(CNV_FILES_SPECIAL:.cnv =.cnv 706 ) 707 $(ALL_RES:.res =.res 708 ) 709 $(CURR_RES_FILES:.res =.res 710 ) 711 $(LANG_RES_FILES:.res =.res 712 ) 713 $(REGION_RES_FILES:.res =.res 714 ) 715 $(ZONE_RES_FILES:.res =.res 716 ) 717 $(UNIT_RES_FILES:.res =.res 718 ) 719 $(COL_COL_FILES:.res =.res 720 ) 721 $(RBNF_RES_FILES:.res =.res 722 ) 723 $(TRANSLIT_RES_FILES:.res =.res 724 ) 725 $(BRK_FILES:.brk =.brk 726 ) 727 $(BRK_DICT_FILES:.dict =.dict 728 ) 729 $(BRK_RES_FILES:.res =.res 730 ) 731 $(SPREP_FILES:.spp=.spp 732 ) 733 <<KEEP 734 -@erase "$(ICU_LIB_TARGET)" 735 @if not exist "$(DLL_OUTPUT)" mkdir "$(DLL_OUTPUT)" 736 copy "$(U_ICUDATA_NAME).dll" "$(ICU_LIB_TARGET)" 737 -@erase "$(U_ICUDATA_NAME).dll" 738 copy "$(ICUTMP)\$(ICUPKG).dat" "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat" 739 -@erase "$(ICUTMP)\$(ICUPKG).dat" 740 !ENDIF 741 742 # utility target to create missing directories 743 CREATE_DIRS : 744 @if not exist "$(ICUOUT)\$(NULL)" mkdir "$(ICUOUT)" 745 @if not exist "$(ICUTMP)\$(NULL)" mkdir "$(ICUTMP)" 746 @if not exist "$(ICUOUT)\build\$(NULL)" mkdir "$(ICUOUT)\build" 747 @if not exist "$(ICUBLD_PKG)\$(NULL)" mkdir "$(ICUBLD_PKG)" 748 @if not exist "$(ICUBLD_PKG)\curr\$(NULL)" mkdir "$(ICUBLD_PKG)\curr" 749 @if not exist "$(ICUBLD_PKG)\lang\$(NULL)" mkdir "$(ICUBLD_PKG)\lang" 750 @if not exist "$(ICUBLD_PKG)\region\$(NULL)" mkdir "$(ICUBLD_PKG)\region" 751 @if not exist "$(ICUBLD_PKG)\zone\$(NULL)" mkdir "$(ICUBLD_PKG)\zone" 752 @if not exist "$(ICUBLD_PKG)\$(ICUBRK)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICUBRK)" 753 @if not exist "$(ICUBLD_PKG)\$(ICUCOL)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICUCOL)" 754 @if not exist "$(ICUBLD_PKG)\$(ICURBNF)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICURBNF)" 755 @if not exist "$(ICUBLD_PKG)\$(ICUTRNS)\$(NULL)" mkdir "$(ICUBLD_PKG)\$(ICUTRNS)" 756 @if not exist "$(TESTDATAOUT)\$(NULL)" mkdir "$(TESTDATAOUT)" 757 @if not exist "$(TESTDATABLD)\$(NULL)" mkdir "$(TESTDATABLD)" 758 @if not exist "$(TESTDATAOUT)\testdata\$(NULL)" mkdir "$(TESTDATAOUT)\testdata" 759 760 # utility target to send us to the right dir 761 GODATA : CREATE_DIRS 762 @cd "$(ICUBLD_PKG)" 763 764 # This is to remove all the data files 765 CLEAN : GODATA 766 @echo Cleaning up the data files. 767 @cd "$(ICUBLD_PKG)" 768 -@erase "*.cnv" 769 -@erase "*.exp" 770 -@erase "*.icu" 771 -@erase "*.lib" 772 -@erase "*.nrm" 773 -@erase "*.res" 774 -@erase "*.spp" 775 -@erase "*.txt" 776 -@erase "*.cfu" 777 -@erase "curr\*.res" 778 -@erase "curr\*.txt" 779 -@erase "lang\*.res" 780 -@erase "lang\*.txt" 781 -@erase "region\*.res" 782 -@erase "region\*.txt" 783 -@erase "zone\*.res" 784 -@erase "zone\*.txt" 785 @cd "$(ICUBLD_PKG)\$(ICUBRK)" 786 -@erase "*.brk" 787 -@erase "*.res" 788 -@erase "*.txt" 789 -@erase "*.dict" 790 @cd "$(ICUBLD_PKG)\$(ICUCOL)" 791 -@erase "*.res" 792 -@erase "*.txt" 793 @cd "$(ICUBLD_PKG)\$(ICURBNF)" 794 -@erase "*.res" 795 -@erase "*.txt" 796 @cd "$(ICUBLD_PKG)\$(ICUTRNS)" 797 -@erase "*.res" 798 @cd "$(ICUOUT)" 799 -@erase "*.dat" 800 @cd "$(ICUTMP)" 801 -@erase "*.html" 802 -@erase "*.lst" 803 -@erase "*.mak" 804 -@erase "*.obj" 805 -@erase "*.res" 806 @cd "$(TESTDATABLD)" 807 -@erase "*.cnv" 808 -@erase "*.icu" 809 -@erase "*.mak" 810 -@erase "*.nrm" 811 -@erase "*.res" 812 -@erase "*.spp" 813 -@erase "*.txt" 814 @cd "$(TESTDATAOUT)" 815 -@erase "*.dat" 816 @cd "$(TESTDATAOUT)\testdata" 817 -@erase "*.typ" 818 @cd "$(ICUBLD_PKG)" 819 820 821 # RBBI .brk file generation. 822 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)\rules}.txt.brk: 823 @echo Creating $@ 824 @"$(ICUTOOLS)\genbrk\$(CFGTOOLS)\genbrk" -c -r $< -o $@ -d"$(ICUBLD_PKG)" -i "$(ICUBLD_PKG)" 825 826 #RBBI .dict file generation. 827 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)\dictionaries}.txt.dict: 828 @echo Creating $@ 829 @"$(ICUTOOLS)\gendict\$(CFGTOOLS)\gendict" -c --uchars $< "$(ICUBLD_PKG)\$@" 830 831 $(ICUBRK)\thaidict.dict: 832 @echo Creating $(ICUBRK)\thaidict.dict 833 @"$(ICUTOOLS)\gendict\$(CFGTOOLS)\gendict" -c --bytes --transform offset-0x0e00 $(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)\dictionaries\thaidict.txt "$(ICUBLD_PKG)\$(ICUBRK)\thaidict.dict" 834 835 $(ICUBRK)\laodict.dict: 836 @echo Creating $(ICUBRK)\laodict.dict 837 @"$(ICUTOOLS)\gendict\$(CFGTOOLS)\gendict" -c --bytes --transform offset-0x0e80 $(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)\dictionaries\laodict.txt "$(ICUBLD_PKG)\$(ICUBRK)\laodict.dict" 838 839 $(ICUBRK)\burmesedict.dict: 840 @echo Creating $(ICUBRK)\burmesedict.dict 841 @"$(ICUTOOLS)\gendict\$(CFGTOOLS)\gendict" -c --bytes --transform offset-0x1000 $(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)\dictionaries\burmesedict.txt "$(ICUBLD_PKG)\$(ICUBRK)\burmesedict.dict" 842 843 $(ICUBRK)\khmerdict.dict: 844 @echo Creating $(ICUBRK)\khmerdict.dict 845 @"$(ICUTOOLS)\gendict\$(CFGTOOLS)\gendict" -c --bytes --transform offset-0x1780 $(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)\dictionaries\khmerdict.txt "$(ICUBLD_PKG)\$(ICUBRK)\khmerdict.dict" 846 847 !IFNDEF ICUDATA_SOURCE_ARCHIVE 848 # Rule for creating converters 849 $(CNV_FILES): $(UCM_SOURCE) 850 @echo Building Charset Conversion table $(@B) 851 @"$(ICUTOOLS)\makeconv\$(CFGTOOLS)\makeconv" -c -d"$(ICUBLD_PKG)" $(ICUSRCDATA_RELATIVE_PATH)\$(ICUUCM)\$(@B).ucm 852 !ENDIF 853 854 !IFDEF BUILD_SPECIAL_CNV_FILES 855 $(CNV_FILES_SPECIAL): $(UCM_SOURCE_SPECIAL) 856 @echo Building Special Charset Conversion table $(@B) 857 @"$(ICUTOOLS)\makeconv\$(CFGTOOLS)\makeconv" -c --ignore-siso-check -d"$(ICUBLD_PKG)" $(ICUSRCDATA_RELATIVE_PATH)\$(ICUUCM)\$(@B).ucm 858 !ENDIF 859 860 # Batch inference rule for creating miscellaneous resource files 861 # TODO: -q option is specified to squelch the 120+ warnings about 862 # empty intvectors and binary elements. Unfortunately, this may 863 # squelch other legitimate warnings. When there is a better 864 # way, remove the -q. 865 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUMISC2)}.txt.res:: 866 @echo Making Miscellaneous Resource Bundle files 867 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -q -d"$(ICUBLD_PKG)" $< 868 869 # Inference rule for creating resource bundle files 870 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICULOC)}.txt.res:: 871 @echo Making Locale Resource Bundle files 872 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" --usePoolBundle $(ICUSRCDATA_RELATIVE_PATH)\$(ICULOC) -k -d"$(ICUBLD_PKG)" $< 873 874 # copy the locales/pool.res file from the source folder to the build output folder 875 # and swap it to native endianness 876 pool.res: $(ICUSRCDATA_RELATIVE_PATH)\$(ICULOC)\pool.res 877 "$(ICUPBIN)\icupkg" -tl "$(ICUSRCDATA_RELATIVE_PATH)\$(ICULOC)\pool.res" pool.res 878 879 res_index.res: 880 @echo Generating <<res_index.txt 881 // Warning this file is automatically generated 882 res_index:table(nofallback) { 883 InstalledLocales { 884 $(GENRB_SOURCE:.txt= {""} 885 ) 886 } 887 } 888 <<KEEP 889 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)" .\res_index.txt 890 891 892 {$(ICUSRCDATA_RELATIVE_PATH)\curr}.txt{curr}.res:: 893 @echo Making currency display name files 894 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" --usePoolBundle $(ICUSRCDATA_RELATIVE_PATH)\curr -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\curr" $< 895 896 # copy the curr/pool.res file from the source folder to the build output folder 897 # and swap it to native endianness 898 curr\pool.res: $(ICUSRCDATA_RELATIVE_PATH)\curr\pool.res 899 "$(ICUPBIN)\icupkg" -tl "$(ICUSRCDATA_RELATIVE_PATH)\curr\pool.res" curr\pool.res 900 901 curr\res_index.res: 902 @echo Generating <<curr\res_index.txt 903 // Warning this file is automatically generated 904 res_index:table(nofallback) { 905 InstalledLocales { 906 $(CURR_SOURCE:.txt= {""} 907 ) 908 } 909 } 910 <<KEEP 911 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\curr" .\curr\res_index.txt 912 913 914 {$(ICUSRCDATA_RELATIVE_PATH)\lang}.txt{lang}.res:: 915 @echo Making language/script display name files 916 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" --usePoolBundle $(ICUSRCDATA_RELATIVE_PATH)\lang -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\lang" $< 917 918 # copy the lang/pool.res file from the source folder to the build output folder 919 # and swap it to native endianness 920 lang\pool.res: $(ICUSRCDATA_RELATIVE_PATH)\lang\pool.res 921 "$(ICUPBIN)\icupkg" -tl "$(ICUSRCDATA_RELATIVE_PATH)\lang\pool.res" lang\pool.res 922 923 lang\res_index.res: 924 @echo Generating <<lang\res_index.txt 925 // Warning this file is automatically generated 926 res_index:table(nofallback) { 927 InstalledLocales { 928 $(LANG_SOURCE:.txt= {""} 929 ) 930 } 931 } 932 <<KEEP 933 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\lang" .\lang\res_index.txt 934 935 936 {$(ICUSRCDATA_RELATIVE_PATH)\region}.txt{region}.res:: 937 @echo Making region display name files 938 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" --usePoolBundle $(ICUSRCDATA_RELATIVE_PATH)\region -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\region" $< 939 940 # copy the region/pool.res file from the source folder to the build output folder 941 # and swap it to native endianness 942 region\pool.res: $(ICUSRCDATA_RELATIVE_PATH)\region\pool.res 943 "$(ICUPBIN)\icupkg" -tl "$(ICUSRCDATA_RELATIVE_PATH)\region\pool.res" region\pool.res 944 945 region\res_index.res: 946 @echo Generating <<region\res_index.txt 947 // Warning this file is automatically generated 948 res_index:table(nofallback) { 949 InstalledLocales { 950 $(REGION_SOURCE:.txt= {""} 951 ) 952 } 953 } 954 <<KEEP 955 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\region" .\region\res_index.txt 956 957 958 {$(ICUSRCDATA_RELATIVE_PATH)\zone}.txt{zone}.res:: 959 @echo Making time zone display name files 960 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" --usePoolBundle $(ICUSRCDATA_RELATIVE_PATH)\zone -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\zone" $< 961 962 # copy the zone/pool.res file from the source folder to the build output folder 963 # and swap it to native endianness 964 zone\pool.res: $(ICUSRCDATA_RELATIVE_PATH)\zone\pool.res 965 "$(ICUPBIN)\icupkg" -tl "$(ICUSRCDATA_RELATIVE_PATH)\zone\pool.res" zone\pool.res 966 967 zone\res_index.res: 968 @echo Generating <<zone\res_index.txt 969 // Warning this file is automatically generated 970 res_index:table(nofallback) { 971 InstalledLocales { 972 $(ZONE_SOURCE:.txt= {""} 973 ) 974 } 975 } 976 <<KEEP 977 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\zone" .\zone\res_index.txt 978 979 980 {$(ICUSRCDATA_RELATIVE_PATH)\unit}.txt{unit}.res:: 981 @echo Making unit display name files 982 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" --usePoolBundle $(ICUSRCDATA_RELATIVE_PATH)\unit -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\unit" $< 983 984 # copy the unit/pool.res file from the source folder to the build output folder 985 # and swap it to native endianness 986 unit\pool.res: $(ICUSRCDATA_RELATIVE_PATH)\unit\pool.res 987 "$(ICUPBIN)\icupkg" -tl "$(ICUSRCDATA_RELATIVE_PATH)\unit\pool.res" unit\pool.res 988 989 unit\res_index.res: 990 @echo Generating <<unit\res_index.txt 991 // Warning this file is automatically generated 992 res_index:table(nofallback) { 993 InstalledLocales { 994 $(UNIT_SOURCE:.txt= {""} 995 ) 996 } 997 } 998 <<KEEP 999 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\unit" .\unit\res_index.txt 1000 1001 1002 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUCOL)}.txt{$(ICUCOL)}.res:: 1003 @echo Making Collation files 1004 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICUCOL)" $< 1005 1006 $(ICUCOL)\res_index.res: 1007 @echo Generating <<$(ICUCOL)\res_index.txt 1008 // Warning this file is automatically generated 1009 res_index:table(nofallback) { 1010 InstalledLocales { 1011 $(COLLATION_SOURCE:.txt= {""} 1012 ) 1013 } 1014 } 1015 <<KEEP 1016 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\$(ICUCOL)" .\$(ICUCOL)\res_index.txt 1017 1018 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICURBNF)}.txt{$(ICURBNF)}.res:: 1019 @echo Making RBNF files 1020 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICURBNF)" $< 1021 1022 $(ICURBNF)\res_index.res: 1023 @echo Generating <<$(ICURBNF)\res_index.txt 1024 // Warning this file is automatically generated 1025 res_index:table(nofallback) { 1026 InstalledLocales { 1027 $(RBNF_SOURCE:.txt= {""} 1028 ) 1029 } 1030 } 1031 <<KEEP 1032 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\$(ICURBNF)" .\$(ICURBNF)\res_index.txt 1033 1034 $(ICUBRK)\res_index.res: 1035 @echo Generating <<$(ICUBRK)\res_index.txt 1036 // Warning this file is automatically generated 1037 res_index:table(nofallback) { 1038 InstalledLocales { 1039 $(BRK_RES_SOURCE:.txt= {""} 1040 ) 1041 } 1042 } 1043 <<KEEP 1044 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -d"$(ICUBLD_PKG)\$(ICUBRK)" .\$(ICUBRK)\res_index.txt 1045 1046 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUBRK)}.txt{$(ICUBRK)}.res:: 1047 @echo Making Break Iterator Resource files 1048 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICUBRK)" $< 1049 1050 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUTRNS)}.txt{$(ICUTRNS)}.res:: 1051 @echo Making Transliterator files 1052 @"$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb" -k -i "$(ICUBLD_PKG)" -d"$(ICUBLD_PKG)\$(ICUTRNS)" $< 1053 1054 1055 # DLL version information 1056 # If you modify this, modify winmode.c in pkgdata. 1057 "$(ICUTMP)\icudata.res": "$(ICUMISC)\icudata.rc" 1058 @echo Creating data DLL version information from $** 1059 @rc.exe /i "..\..\..\..\common" /r /fo $@ $** 1060 1061 # Targets for converters 1062 "$(ICUBLD_PKG)\cnvalias.icu" : {"$(ICUSRCDATA)\$(ICUUCM)"}\convrtrs.txt "$(ICUTOOLS)\gencnval\$(CFGTOOLS)\gencnval.exe" 1063 @echo Creating data file for Converter Aliases 1064 @"$(ICUTOOLS)\gencnval\$(CFGTOOLS)\gencnval" -d "$(ICUBLD_PKG)" "$(ICUSRCDATA)\$(ICUUCM)\convrtrs.txt" 1065 1066 # Targets for prebuilt Unicode data 1067 "$(ICUBLD_PKG)\pnames.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\pnames.icu 1068 "$(ICUPBIN)\icupkg" -tl $? $@ 1069 1070 "$(ICUBLD_PKG)\ubidi.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\ubidi.icu 1071 "$(ICUPBIN)\icupkg" -tl $? $@ 1072 1073 "$(ICUBLD_PKG)\ucase.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\ucase.icu 1074 "$(ICUPBIN)\icupkg" -tl $? $@ 1075 1076 "$(ICUBLD_PKG)\uprops.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\uprops.icu 1077 "$(ICUPBIN)\icupkg" -tl $? $@ 1078 1079 "$(ICUBLD_PKG)\unames.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\unames.icu 1080 "$(ICUPBIN)\icupkg" -tl $? $@ 1081 1082 "$(ICUBLD_PKG)\nfc.nrm": $(ICUSRCDATA_RELATIVE_PATH)\in\nfc.nrm 1083 "$(ICUPBIN)\icupkg" -tl $? $@ 1084 1085 "$(ICUBLD_PKG)\nfkc.nrm": $(ICUSRCDATA_RELATIVE_PATH)\in\nfkc.nrm 1086 "$(ICUPBIN)\icupkg" -tl $? $@ 1087 1088 "$(ICUBLD_PKG)\nfkc_cf.nrm": $(ICUSRCDATA_RELATIVE_PATH)\in\nfkc_cf.nrm 1089 "$(ICUPBIN)\icupkg" -tl $? $@ 1090 1091 "$(ICUBLD_PKG)\uts46.nrm": $(ICUSRCDATA_RELATIVE_PATH)\in\uts46.nrm 1092 "$(ICUPBIN)\icupkg" -tl $? $@ 1093 1094 "$(ICUBLD_PKG)\coll\ucadata.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\coll\ucadata-unihan.icu 1095 "$(ICUPBIN)\icupkg" -tl $? $@ 1096 1097 # Stringprep .spp file generation. 1098 {$(ICUSRCDATA_RELATIVE_PATH)\$(ICUSPREP)}.txt.spp: 1099 @echo Creating $@ 1100 @"$(ICUTOOLS)\gensprep\$(CFGTOOLS)\gensprep" -s $(<D) -d "$(ICUBLD_PKG)" -b $(@B) -m "$(ICUUNIDATA)" -u 3.2.0 $(<F) 1101 1102 # Confusables .cfu file generation 1103 # Can't use an inference rule because two .txt source files combine to produce a single .cfu output file 1104 "$(ICUBLD_PKG)\confusables.cfu": "$(ICUUNIDATA)\confusables.txt" "$(ICUUNIDATA)\confusablesWholeScript.txt" "$(ICUTOOLS)\gencfu\$(CFGTOOLS)\gencfu.exe" 1105 @echo Creating $@ 1106 @"$(ICUTOOLS)\gencfu\$(CFGTOOLS)\gencfu" -c -r "$(ICUUNIDATA)\confusables.txt" -w "$(ICUUNIDATA)\confusablesWholeScript.txt" -o $@ -i "$(ICUBLD_PKG)" 1107 1108 !IFDEF ICUDATA_ARCHIVE 1109 "$(ICUDATA_SOURCE_ARCHIVE)": CREATE_DIRS $(ICUDATA_ARCHIVE) "$(ICUTOOLS)\icupkg\$(CFGTOOLS)\icupkg.exe" 1110 "$(ICUTOOLS)\icupkg\$(CFGTOOLS)\icupkg" -t$(U_ICUDATA_ENDIAN_SUFFIX) "$(ICUDATA_ARCHIVE)" "$(ICUDATA_SOURCE_ARCHIVE)" 1111 !ENDIF 1112 1113 # Dependencies on the tools for the batch inference rules 1114 1115 !IFNDEF ICUDATA_SOURCE_ARCHIVE 1116 $(UCM_SOURCE) : {"$(ICUTOOLS)\makeconv\$(CFGTOOLS)"}makeconv.exe 1117 1118 !IFDEF BUILD_SPECIAL_CNV_FILES 1119 $(UCM_SOURCE_SPECIAL): {"$(ICUTOOLS)\makeconv\$(CFGTOOLS)"}makeconv.exe 1120 !ENDIF 1121 1122 # This used to depend on "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\ubidi.icu" 1123 # This data is now hard coded as a part of the library. 1124 # See Jitterbug 4497 for details. 1125 $(MISC_SOURCE) $(RB_FILES) $(CURR_FILES) $(LANG_FILES) $(REGION_FILES) $(ZONE_FILES) $(UNIT_FILES) $(COL_COL_FILES) $(RBNF_RES_FILES) $(BRK_RES_FILES) $(TRANSLIT_RES_FILES): {"$(ICUTOOLS)\genrb\$(CFGTOOLS)"}genrb.exe "$(ICUBLD_PKG)\$(ICUCOL)\ucadata.icu" 1126 1127 # This used to depend on "$(ICUBLD_PKG)\pnames.icu" "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\ubidi.icu" 1128 # These are now hardcoded in ICU4C and only loaded in ICU4J. 1129 $(BRK_SOURCE) : "$(ICUBLD_PKG)\unames.icu" 1130 !ENDIF 1131