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