2016-06-15 18:58:17 +00:00
|
|
|
# Copyright (C) 2016 and later: Unicode, Inc. and others.
|
|
|
|
# License & terms of use: http://www.unicode.org/copyright.html
|
2000-12-03 04:09:23 +00:00
|
|
|
#**********************************************************************
|
2016-05-31 21:45:07 +00:00
|
|
|
#* Copyright (C) 1999-2016, International Business Machines Corporation
|
|
|
|
#* and others. All Rights Reserved.
|
2000-12-03 04:09:23 +00:00
|
|
|
#**********************************************************************
|
|
|
|
# nmake file for creating data files on win32
|
|
|
|
# invoke with
|
2003-10-05 23:44:30 +00:00
|
|
|
# nmake /f makedata.mak icumake=$(ProjectDir)
|
2000-12-03 04:09:23 +00:00
|
|
|
#
|
|
|
|
# 12/10/1999 weiv Created
|
|
|
|
|
2002-03-19 01:43:19 +00:00
|
|
|
##############################################################################
|
2011-05-07 02:32:52 +00:00
|
|
|
# Keep the following in sync with the version - see common/unicode/uvernum.h
|
2018-09-19 18:36:48 +00:00
|
|
|
U_ICUDATA_NAME=icudt63
|
2002-03-19 01:43:19 +00:00
|
|
|
##############################################################################
|
2017-03-21 01:03:49 +00:00
|
|
|
!IF "$(UWP)" == "UWP"
|
2017-10-06 07:31:14 +00:00
|
|
|
# Optionally change the name of the data file for the UWP version.
|
2018-09-19 18:36:48 +00:00
|
|
|
U_ICUDATA_NAME=icudt63
|
2017-03-21 01:03:49 +00:00
|
|
|
!ENDIF
|
2001-07-26 21:55:49 +00:00
|
|
|
U_ICUDATA_ENDIAN_SUFFIX=l
|
2018-03-09 23:53:02 +00:00
|
|
|
UNICODE_VERSION=11.0
|
2006-03-27 17:40:56 +00:00
|
|
|
ICU_LIB_TARGET=$(DLL_OUTPUT)\$(U_ICUDATA_NAME).dll
|
2000-12-03 04:09:23 +00:00
|
|
|
|
2002-01-24 02:28:22 +00:00
|
|
|
# ICUMAKE
|
2001-07-26 21:55:49 +00:00
|
|
|
# Must be provided by whoever runs this makefile.
|
|
|
|
# Is the directory containing this file (makedata.mak)
|
|
|
|
# Is the directory into which most data is built (prior to packaging)
|
2009-07-17 22:57:26 +00:00
|
|
|
# Is icu\source\data\
|
2001-07-26 21:55:49 +00:00
|
|
|
#
|
2002-01-24 02:28:22 +00:00
|
|
|
!IF "$(ICUMAKE)"==""
|
|
|
|
!ERROR Can't find ICUMAKE (ICU Data Make dir, should point to icu\source\data\ )!
|
2000-12-03 04:09:23 +00:00
|
|
|
!ENDIF
|
2002-01-24 02:28:22 +00:00
|
|
|
!MESSAGE ICU data make path is $(ICUMAKE)
|
|
|
|
|
2018-08-25 06:39:10 +00:00
|
|
|
!IF [py -3 -c "exit(0)"]!=0
|
|
|
|
!MESSAGE Information: Unable to find Python 3. Data will fail to build from source.
|
2018-09-21 22:06:57 +00:00
|
|
|
!ENDIF
|
|
|
|
|
2005-09-20 07:15:06 +00:00
|
|
|
# Suffixes for data files
|
2010-01-06 23:50:03 +00:00
|
|
|
.SUFFIXES : .nrm .icu .ucm .cnv .dll .dat .res .txt .c
|
2005-09-20 07:15:06 +00:00
|
|
|
|
2002-01-24 02:28:22 +00:00
|
|
|
ICUOUT=$(ICUMAKE)\out
|
2000-12-03 04:09:23 +00:00
|
|
|
|
2018-05-26 19:23:18 +00:00
|
|
|
# the prefix "icudt62_" for use in filenames
|
2004-04-14 19:39:08 +00:00
|
|
|
ICUPKG=$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX)
|
|
|
|
|
2003-05-08 01:40:26 +00:00
|
|
|
# need to nuke \\ for .NET...
|
|
|
|
ICUOUT=$(ICUOUT:\\=\)
|
|
|
|
|
2005-03-25 05:40:51 +00:00
|
|
|
ICUBLD=$(ICUOUT)\build
|
|
|
|
ICUBLD_PKG=$(ICUBLD)\$(ICUPKG)
|
2004-04-14 19:39:08 +00:00
|
|
|
ICUTMP=$(ICUOUT)\tmp
|
2000-12-03 04:09:23 +00:00
|
|
|
|
2001-07-26 21:55:49 +00:00
|
|
|
# ICUP
|
|
|
|
# The root of the ICU source directory tree
|
|
|
|
#
|
2002-01-24 02:28:22 +00:00
|
|
|
ICUP=$(ICUMAKE)\..\..
|
|
|
|
ICUP=$(ICUP:\source\data\..\..=)
|
2002-06-28 23:13:30 +00:00
|
|
|
# In case the first one didn't do it, try this one. .NET would do the second one.
|
|
|
|
ICUP=$(ICUP:\source\data\\..\..=)
|
2002-01-24 02:28:22 +00:00
|
|
|
!MESSAGE ICU root path is $(ICUP)
|
|
|
|
|
2001-07-26 21:55:49 +00:00
|
|
|
|
2002-01-24 02:28:22 +00:00
|
|
|
# ICUSRCDATA
|
|
|
|
# The data directory in source
|
|
|
|
#
|
|
|
|
ICUSRCDATA=$(ICUP)\source\data
|
2006-03-27 17:40:56 +00:00
|
|
|
ICUSRCDATA_RELATIVE_PATH=..\..\..
|
2002-01-24 02:28:22 +00:00
|
|
|
|
2018-08-25 06:39:10 +00:00
|
|
|
# Timestamp files to keep track of current build state
|
|
|
|
TOOLS_TS=$(ICUTMP)\tools.timestamp
|
|
|
|
COREDATA_TS=$(ICUTMP)\coredata.timestamp
|
2002-03-08 01:57:46 +00:00
|
|
|
|
2004-04-14 19:39:08 +00:00
|
|
|
# ICUCOL
|
|
|
|
# The directory that contains colfiles.mk files along with *.txt collation data files
|
|
|
|
#
|
|
|
|
ICUCOL=coll
|
|
|
|
|
2004-07-14 18:35:16 +00:00
|
|
|
# ICURBNF
|
|
|
|
# The directory that contains rbnffiles.mk files along with *.txt RBNF data files
|
|
|
|
#
|
|
|
|
ICURBNF=rbnf
|
|
|
|
|
2004-08-02 20:06:55 +00:00
|
|
|
# ICUTRNS
|
2002-01-24 02:28:22 +00:00
|
|
|
# The directory that contains trfiles.mk files along with *.txt transliterator files
|
|
|
|
#
|
2002-03-08 01:57:46 +00:00
|
|
|
ICUTRNS=translit
|
2002-01-24 02:28:22 +00:00
|
|
|
|
|
|
|
# ICUBRK
|
|
|
|
# The directory that contains resfiles.mk files along with *.txt break iterator files
|
|
|
|
#
|
2004-07-13 08:08:17 +00:00
|
|
|
ICUBRK=brkitr
|
2002-01-24 02:28:22 +00:00
|
|
|
|
2001-07-26 21:55:49 +00:00
|
|
|
#
|
|
|
|
# ICUDATA
|
|
|
|
# The source directory. Contains the source files for the common data to be built.
|
|
|
|
# WARNING: NOT THE SAME AS ICU_DATA environment variable. Confusing.
|
2002-01-24 02:28:22 +00:00
|
|
|
ICUDATA=$(ICUP)\source\data
|
2000-12-03 04:09:23 +00:00
|
|
|
|
2001-07-26 21:55:49 +00:00
|
|
|
#
|
|
|
|
# DLL_OUTPUT
|
|
|
|
# Destination directory for the common data DLL file.
|
|
|
|
# This is the same place that all of the other ICU DLLs go (the code-containing DLLs)
|
|
|
|
# The lib file for the data DLL goes in $(DLL_OUTPUT)/../lib/
|
|
|
|
#
|
2017-03-21 01:03:49 +00:00
|
|
|
!IF "$(CFG)" == "ARM\Release" || "$(CFG)" == "ARM\Debug"
|
|
|
|
DLL_OUTPUT=$(ICUP)\binARM$(UWP)
|
|
|
|
!ELSE IF "$(CFG)" == "x64\Release" || "$(CFG)" == "x64\Debug"
|
|
|
|
DLL_OUTPUT=$(ICUP)\bin64$(UWP)
|
|
|
|
!ELSE IF "$(UWP)" == "UWP"
|
|
|
|
DLL_OUTPUT=$(ICUP)\bin32$(UWP)
|
2008-08-12 04:41:41 +00:00
|
|
|
!ELSE
|
2017-03-21 01:03:49 +00:00
|
|
|
DLL_OUTPUT=$(ICUP)\bin$(UWP)
|
2008-08-12 04:41:41 +00:00
|
|
|
!ENDIF
|
2000-12-03 04:09:23 +00:00
|
|
|
|
2001-07-26 21:55:49 +00:00
|
|
|
#
|
|
|
|
# TESTDATA
|
|
|
|
# The source directory for data needed for test programs.
|
2000-12-03 04:09:23 +00:00
|
|
|
TESTDATA=$(ICUP)\source\test\testdata
|
|
|
|
|
2001-07-26 21:55:49 +00:00
|
|
|
#
|
|
|
|
# TESTDATAOUT
|
|
|
|
# The destination directory for the built test data .dat file
|
2006-03-27 17:40:56 +00:00
|
|
|
TESTDATAOUT=$(ICUP)\source\test\testdata\out
|
2000-12-03 04:09:23 +00:00
|
|
|
|
2002-01-24 02:28:22 +00:00
|
|
|
#
|
|
|
|
# TESTDATABLD
|
|
|
|
# The build directory for test data intermidiate files
|
|
|
|
# (Tests are NOT run from this makefile,
|
|
|
|
# only the data is put in place.)
|
|
|
|
TESTDATABLD=$(ICUP)\source\test\testdata\out\build
|
2000-12-03 04:09:23 +00:00
|
|
|
|
2001-07-26 21:55:49 +00:00
|
|
|
#
|
|
|
|
# ICUTOOLS
|
|
|
|
# Directory under which all of the ICU data building tools live.
|
|
|
|
#
|
2000-12-03 04:09:23 +00:00
|
|
|
ICUTOOLS=$(ICUP)\source\tools
|
2017-03-21 01:03:49 +00:00
|
|
|
!MESSAGE ICU tools path is $(ICUTOOLS)
|
|
|
|
|
|
|
|
#
|
|
|
|
# TOOLS CFG PATH
|
|
|
|
# ARM needs to use one of the other tools, so make sure to get an usable cfg path
|
|
|
|
# Since tools, particularly pkggen, have architecture built-in, we made x64 on
|
|
|
|
# Windows be machine-independent and use those tools.
|
|
|
|
#
|
|
|
|
CFGTOOLS=$(CFG)
|
|
|
|
!IF "$(CFG)" == "ARM\Release" || "$(CFG)" == "ARM\Debug"
|
|
|
|
CFGTOOLS=x64\Release
|
|
|
|
!ENDIF
|
|
|
|
!MESSAGE ICU tools CFG subpath is $(CFGTOOLS)
|
2000-12-03 04:09:23 +00:00
|
|
|
|
2004-02-25 22:25:13 +00:00
|
|
|
# The current ICU tools need to be in the path first.
|
2017-03-21 01:03:49 +00:00
|
|
|
# x86 uses x86, x64 and arm use x64
|
|
|
|
!IF "$(CFG)" == "x86\Release" || "$(CFG)" == "x86\Debug"
|
2004-02-25 22:25:13 +00:00
|
|
|
PATH = $(ICUP)\bin;$(PATH)
|
2008-08-12 04:41:41 +00:00
|
|
|
ICUPBIN=$(ICUP)\bin
|
2017-03-21 01:03:49 +00:00
|
|
|
!ELSE
|
|
|
|
PATH = $(ICUP)\bin64;$(PATH)
|
|
|
|
ICUPBIN=$(ICUP)\bin64
|
2008-08-12 04:41:41 +00:00
|
|
|
!ENDIF
|
|
|
|
|
2004-02-25 22:25:13 +00:00
|
|
|
|
|
|
|
# This variable can be overridden to "-m static" by the project settings,
|
|
|
|
# if you want a static data library.
|
|
|
|
!IF "$(ICU_PACKAGE_MODE)"==""
|
|
|
|
ICU_PACKAGE_MODE=-m dll
|
|
|
|
!ENDIF
|
2001-07-26 21:55:49 +00:00
|
|
|
|
2005-03-25 05:40:51 +00:00
|
|
|
# If this archive exists, build from that
|
|
|
|
# instead of building everything from scratch.
|
|
|
|
ICUDATA_SOURCE_ARCHIVE=$(ICUSRCDATA)\in\$(ICUPKG).dat
|
|
|
|
!IF !EXISTS("$(ICUDATA_SOURCE_ARCHIVE)")
|
2005-09-20 07:15:06 +00:00
|
|
|
# Does a big endian version exist either?
|
|
|
|
ICUDATA_ARCHIVE=$(ICUSRCDATA)\in\$(U_ICUDATA_NAME)b.dat
|
|
|
|
!IF EXISTS("$(ICUDATA_ARCHIVE)")
|
|
|
|
ICUDATA_SOURCE_ARCHIVE=$(ICUTMP)\$(ICUPKG).dat
|
|
|
|
!ELSE
|
|
|
|
# Nothing was usable for input
|
2005-03-25 05:40:51 +00:00
|
|
|
!UNDEF ICUDATA_SOURCE_ARCHIVE
|
|
|
|
!ENDIF
|
2005-09-20 07:15:06 +00:00
|
|
|
!ENDIF
|
2005-03-25 05:40:51 +00:00
|
|
|
|
2005-09-20 07:15:06 +00:00
|
|
|
!IFDEF ICUDATA_SOURCE_ARCHIVE
|
|
|
|
!MESSAGE ICU data source archive is $(ICUDATA_SOURCE_ARCHIVE)
|
2009-11-13 14:39:02 +00:00
|
|
|
!ENDIF
|
|
|
|
|
2005-03-25 05:40:51 +00:00
|
|
|
# Common defines for both ways of building ICU's data library.
|
2008-08-12 04:41:41 +00:00
|
|
|
COMMON_ICUDATA_DEPENDENCIES="$(ICUPBIN)\pkgdata.exe" "$(ICUTMP)\icudata.res" "$(ICUP)\source\stubdata\stubdatabuilt.txt"
|
2008-11-24 20:04:52 +00:00
|
|
|
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 .
|
2017-03-21 01:03:49 +00:00
|
|
|
!IF "$(UWP)" == "UWP"
|
|
|
|
COMMON_ICUDATA_ARGUMENTS=$(COMMON_ICUDATA_ARGUMENTS) -u
|
|
|
|
!IF "$(CFG)" == "ARM\Release" || "$(CFG)" == "ARM\Debug"
|
|
|
|
COMMON_ICUDATA_ARGUMENTS=$(COMMON_ICUDATA_ARGUMENTS) -a
|
|
|
|
!ENDIF
|
|
|
|
!ENDIF
|
2005-03-25 05:40:51 +00:00
|
|
|
|
2001-07-26 21:55:49 +00:00
|
|
|
#############################################################################
|
|
|
|
#
|
2003-10-05 23:44:30 +00:00
|
|
|
# ALL
|
2001-07-26 21:55:49 +00:00
|
|
|
# This target builds all the data files. The world starts here.
|
2005-03-25 05:40:51 +00:00
|
|
|
# Note: we really want the common data dll to go to $(DLL_OUTPUT), not $(ICUBLD_PKG). But specifying
|
2001-08-01 20:15:06 +00:00
|
|
|
# that here seems to cause confusion with the building of the stub library of the same name.
|
2005-03-25 05:40:51 +00:00
|
|
|
# Building the common dll in $(ICUBLD_PKG) unconditionally copies it to $(DLL_OUTPUT) too.
|
2001-07-26 21:55:49 +00:00
|
|
|
#
|
|
|
|
#############################################################################
|
2006-03-27 17:40:56 +00:00
|
|
|
ALL : GODATA "$(ICU_LIB_TARGET)" "$(TESTDATAOUT)\testdata.dat"
|
2000-12-03 04:09:23 +00:00
|
|
|
@echo All targets are up to date
|
|
|
|
|
2017-03-21 01:03:49 +00:00
|
|
|
!IF "$(UWP)" == "UWP"
|
|
|
|
@if not exist "$(ICUMAKE)\..\..\commondata\" mkdir "$(ICUMAKE)\..\..\commondata\"
|
|
|
|
copy "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat" "$(ICUMAKE)\..\..\commondata\"
|
|
|
|
!ENDIF
|
|
|
|
|
2018-08-25 06:39:10 +00:00
|
|
|
|
|
|
|
# Three main targets: tools, core data, and test data.
|
|
|
|
# Keep track of whether they are built via timestamp files.
|
|
|
|
|
|
|
|
$(TOOLS_TS): "$(ICUTOOLS)\genrb\$(CFGTOOLS)\genrb.exe" "$(ICUTOOLS)\gencnval\$(CFGTOOLS)\gencnval.exe" "$(ICUTOOLS)\gencfu\$(CFGTOOLS)\gencfu.exe" "$(ICUTOOLS)\icupkg\$(CFGTOOLS)\icupkg.exe" "$(ICUTOOLS)\makeconv\$(CFGTOOLS)\makeconv.exe" "$(ICUPBIN)\pkgdata.exe"
|
|
|
|
@echo "timestamp" > $(TOOLS_TS)
|
|
|
|
|
|
|
|
# On Unix, Python generates at configure time a list of Makefile rules.
|
|
|
|
# On Windows, however, we run the Python data build script at build time instead.
|
|
|
|
# The alternative would be to use a preprocessor macro to generate rules for nmake.
|
|
|
|
# However, this approach was abandoned for reasons including:
|
|
|
|
#
|
|
|
|
# - nmake imposes more stringent restrictions on command line length.
|
|
|
|
# - The lack of gnumake features makes nmake file construction more complex.
|
|
|
|
# - Windows builds are single-threaded, giving less advantage to a Makefile approach.
|
|
|
|
#
|
|
|
|
# Currently, the entire script needs to run even for small changes to data. Maybe consider
|
|
|
|
# checking file-changed timestamps in Python to build only the required subset of data.
|
|
|
|
|
|
|
|
$(COREDATA_TS):
|
|
|
|
@cd "$(ICUSRCDATA)"
|
|
|
|
py -3 -m buildtool \
|
|
|
|
--format windirect \
|
|
|
|
--in_dir "$(ICUSRCDATA)" \
|
|
|
|
--tool_dir "$(ICUTOOLS)" \
|
|
|
|
--tool_cfg "$(CFG)" \
|
|
|
|
--out_dir "$(ICUBLD_PKG)" \
|
|
|
|
--tmp_dir "$(ICUTMP)"
|
|
|
|
@echo "timestamp" > $(COREDATA_TS)
|
|
|
|
|
|
|
|
|
2010-02-13 23:15:05 +00:00
|
|
|
# The core Unicode properties files (uprops.icu, ucase.icu, ubidi.icu)
|
2005-05-05 17:43:10 +00:00
|
|
|
# are hardcoded in the common DLL and therefore not included in the data package any more.
|
|
|
|
# They are not built by default but need to be built for ICU4J data and for getting the .c source files
|
|
|
|
# when updating the Unicode data.
|
|
|
|
# Changed in makedata.mak revision 1.117. See Jitterbug 4497.
|
2010-12-31 18:21:36 +00:00
|
|
|
# 2010-dec Removed pnames.icu.
|
2007-08-15 21:42:41 +00:00
|
|
|
# Command line:
|
2010-01-06 23:50:03 +00:00
|
|
|
# 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
|
2014-09-08 03:05:56 +00:00
|
|
|
uni-core-data: GODATA "$(ICUBLD_PKG)\pnames.icu" "$(ICUBLD_PKG)\uprops.icu" "$(ICUBLD_PKG)\ucase.icu" "$(ICUBLD_PKG)\ubidi.icu" "$(ICUBLD_PKG)\nfc.nrm"
|
2005-05-05 17:43:10 +00:00
|
|
|
@echo Unicode .icu files built to "$(ICUBLD_PKG)"
|
|
|
|
|
2009-07-17 22:57:26 +00:00
|
|
|
# Build the ICU4J icudata.jar and testdata.jar.
|
2010-02-05 02:02:43 +00:00
|
|
|
# see icu4j-readme.txt
|
2009-07-17 22:57:26 +00:00
|
|
|
|
2011-09-26 15:30:34 +00:00
|
|
|
ICU4J_TZDATA="$(ICUOUT)\icu4j\icutzdata.jar"
|
|
|
|
ICU4J_DATA_DIRNAME=com\ibm\icu\impl\data\$(U_ICUDATA_NAME)b
|
|
|
|
ICU4J_TZDATA_PATHS=$(ICU4J_DATA_DIRNAME)\zoneinfo64.res $(ICU4J_DATA_DIRNAME)\metaZones.res $(ICU4J_DATA_DIRNAME)\timezoneTypes.res $(ICU4J_DATA_DIRNAME)\windowsZones.res
|
|
|
|
|
|
|
|
generate-data: GODATA "$(ICUOUT)\$(ICUPKG).dat" uni-core-data
|
|
|
|
if not exist "$(ICUOUT)\icu4j\$(ICU4J_DATA_DIRNAME)" mkdir "$(ICUOUT)\icu4j\$(ICU4J_DATA_DIRNAME)"
|
|
|
|
if not exist "$(ICUOUT)\icu4j\tzdata\$(ICU4J_DATA_DIRNAME)" mkdir "$(ICUOUT)\icu4j\tzdata\$(ICU4J_DATA_DIRNAME)"
|
2014-09-08 03:05:56 +00:00
|
|
|
echo pnames.icu ubidi.icu ucase.icu uprops.icu nfc.nrm > "$(ICUOUT)\icu4j\add.txt"
|
2011-09-26 15:30:34 +00:00
|
|
|
"$(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)"
|
|
|
|
@for %f in ($(ICU4J_TZDATA_PATHS)) do @move "$(ICUOUT)\icu4j\%f" "$(ICUOUT)\icu4j\tzdata\$(ICU4J_DATA_DIRNAME)"
|
|
|
|
|
|
|
|
"$(ICUOUT)\icu4j\icutzdata.jar": GODATA generate-data
|
|
|
|
"$(JAR)" cf "$(ICUOUT)\icu4j\icutzdata.jar" -C "$(ICUOUT)\icu4j\tzdata" "$(ICU4J_DATA_DIRNAME)"
|
|
|
|
|
2009-07-17 22:57:26 +00:00
|
|
|
# Build icudata.jar:
|
|
|
|
# - add the uni-core-data to the ICU package
|
|
|
|
# - swap the ICU data
|
|
|
|
# - extract all data items
|
|
|
|
# - package them into the .jar file
|
2011-09-26 15:30:34 +00:00
|
|
|
"$(ICUOUT)\icu4j\icudata.jar": GODATA generate-data
|
|
|
|
"$(JAR)" cf "$(ICUOUT)\icu4j\icudata.jar" -C "$(ICUOUT)\icu4j" "$(ICU4J_DATA_DIRNAME)"
|
2009-07-17 22:57:26 +00:00
|
|
|
|
|
|
|
# Build testdata.jar:
|
|
|
|
# - swap the test data
|
|
|
|
# - extract all data items
|
|
|
|
# - package them into the .jar file
|
|
|
|
"$(ICUOUT)\icu4j\testdata.jar": GODATA "$(TESTDATAOUT)\testdata.dat"
|
|
|
|
if not exist "$(ICUOUT)\icu4j\com\ibm\icu\dev\data\testdata" mkdir "$(ICUOUT)\icu4j\com\ibm\icu\dev\data\testdata"
|
|
|
|
"$(ICUPBIN)\icupkg" "$(TESTDATAOUT)\testdata.dat" -r test.icu -x * -tb -d "$(ICUOUT)\icu4j\com\ibm\icu\dev\data\testdata"
|
|
|
|
"$(JAR)" cf "$(ICUOUT)\icu4j\testdata.jar" -C "$(ICUOUT)\icu4j" com\ibm\icu\dev\data\testdata
|
|
|
|
|
2010-02-05 02:02:43 +00:00
|
|
|
## Compare to: source\data\Makefile.in and source\test\testdata\Makefile.in
|
|
|
|
|
|
|
|
DEBUGUTILITIESDATA_DIR=main\tests\core\src\com\ibm\icu\dev\test\util
|
|
|
|
DEBUGUTILITIESDATA_SRC=DebugUtilitiesData.java
|
|
|
|
|
|
|
|
# Build DebugUtilitiesData.java
|
2017-03-21 01:03:49 +00:00
|
|
|
"$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" : {"$(ICUTOOLS)\gentest\$(CFGTOOLS)"}gentest.exe
|
2010-02-05 02:02:43 +00:00
|
|
|
if not exist "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)" mkdir "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)"
|
2017-03-21 01:03:49 +00:00
|
|
|
"$(ICUTOOLS)\gentest\$(CFGTOOLS)\gentest" -j -d"$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)"
|
2010-02-05 02:02:43 +00:00
|
|
|
|
|
|
|
ICU4J_DATA="$(ICUOUT)\icu4j\icudata.jar" "$(ICUOUT)\icu4j\testdata.jar" "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)"
|
|
|
|
|
2011-09-26 15:30:34 +00:00
|
|
|
icu4j-data: GODATA $(ICU4J_DATA) $(ICU4J_TZDATA)
|
2010-02-05 02:02:43 +00:00
|
|
|
|
2009-07-17 22:57:26 +00:00
|
|
|
!IFDEF ICU4J_ROOT
|
|
|
|
|
|
|
|
"$(ICU4J_ROOT)\main\shared\data\icudata.jar": "$(ICUOUT)\icu4j\icudata.jar"
|
|
|
|
if not exist "$(ICU4J_ROOT)\main\shared\data" mkdir "$(ICU4J_ROOT)\main\shared\data"
|
|
|
|
copy "$(ICUOUT)\icu4j\icudata.jar" "$(ICU4J_ROOT)\main\shared\data"
|
|
|
|
|
2011-09-26 15:30:34 +00:00
|
|
|
"$(ICU4J_ROOT)\main\shared\data\icutzdata.jar": "$(ICUOUT)\icu4j\icutzdata.jar"
|
|
|
|
if not exist "$(ICU4J_ROOT)\main\shared\data" mkdir "$(ICU4J_ROOT)\main\shared\data"
|
|
|
|
copy "$(ICUOUT)\icu4j\icutzdata.jar" "$(ICU4J_ROOT)\main\shared\data"
|
|
|
|
|
2009-07-17 22:57:26 +00:00
|
|
|
"$(ICU4J_ROOT)\main\shared\data\testdata.jar": "$(ICUOUT)\icu4j\testdata.jar"
|
|
|
|
if not exist "$(ICU4J_ROOT)\main\shared\data" mkdir "$(ICU4J_ROOT)\main\shared\data"
|
|
|
|
copy "$(ICUOUT)\icu4j\testdata.jar" "$(ICU4J_ROOT)\main\shared\data"
|
|
|
|
|
2010-02-05 02:02:43 +00:00
|
|
|
# "$(DEBUGUTILTIESDATA_OUT)"
|
2009-07-17 22:57:26 +00:00
|
|
|
|
2010-02-05 02:02:43 +00:00
|
|
|
"$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)": "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)"
|
|
|
|
if not exist "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)" mkdir "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)"
|
|
|
|
copy "$(ICUOUT)\icu4j\src\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)" "$(ICU4J_ROOT)\$(DEBUGUTILITIESDATA_DIR)\$(DEBUGUTILITIESDATA_SRC)"
|
2009-07-17 22:57:26 +00:00
|
|
|
|
2011-09-26 15:30:34 +00:00
|
|
|
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)"
|
2010-02-05 02:02:43 +00:00
|
|
|
|
2011-09-26 15:30:34 +00:00
|
|
|
icu4j-data-install : GODATA $(ICU4J_DATA) $(ICU4J_TZDATA) $(ICU4J_DATA_INSTALLED)
|
2010-02-05 02:02:43 +00:00
|
|
|
@echo ICU4J data output to "$(ICU4J_ROOT)"
|
|
|
|
|
|
|
|
!ELSE
|
|
|
|
|
|
|
|
icu4j-data-install :
|
|
|
|
@echo ERROR ICU4J_ROOT not set
|
|
|
|
@exit 1
|
2009-07-17 22:57:26 +00:00
|
|
|
|
|
|
|
!ENDIF
|
|
|
|
|
2010-02-05 02:02:43 +00:00
|
|
|
|
|
|
|
|
2001-07-26 21:55:49 +00:00
|
|
|
#
|
2003-10-05 23:44:30 +00:00
|
|
|
# testdata - nmake will invoke pkgdata, which will create testdata.dat
|
2001-07-26 21:55:49 +00:00
|
|
|
#
|
2018-08-25 06:39:10 +00:00
|
|
|
"$(TESTDATAOUT)\testdata.dat": "$(TESTDATA)\*" $(TOOLS_TS) $(COREDATA_TS)
|
2001-03-19 22:35:36 +00:00
|
|
|
@cd "$(TESTDATA)"
|
2001-10-31 23:57:05 +00:00
|
|
|
@echo building testdata...
|
2018-08-25 06:39:10 +00:00
|
|
|
nmake /nologo /f "$(TESTDATA)\testdata.mak" TESTDATA=. ICUTOOLS="$(ICUTOOLS)" ICUPBIN="$(ICUPBIN)" ICUP="$(ICUP)" CFG=$(CFGTOOLS) TESTDATAOUT="$(TESTDATAOUT)" TESTDATABLD="$(TESTDATABLD)" ICUSRCDATA="$(ICUSRCDATA)" DLL_OUTPUT="$(DLL_OUTPUT)"
|
2001-03-19 22:35:36 +00:00
|
|
|
|
2001-07-26 21:55:49 +00:00
|
|
|
#invoke pkgdata for ICU common data
|
2005-03-25 05:40:51 +00:00
|
|
|
# pkgdata will drop all output files (.dat, .dll, .lib) into the target (ICUBLD_PKG) directory.
|
2001-07-26 21:55:49 +00:00
|
|
|
# move the .dll and .lib files to their final destination afterwards.
|
2002-03-08 01:57:46 +00:00
|
|
|
# The $(U_ICUDATA_NAME).lib and $(U_ICUDATA_NAME).exp should already be in the right place due to stubdata.
|
2001-07-26 21:55:49 +00:00
|
|
|
#
|
2005-05-05 17:43:10 +00:00
|
|
|
# 2005-may-05 Removed Unicode properties files (unorm.icu, uprops.icu, ucase.icu, ubidi.icu)
|
|
|
|
# from data build. See Jitterbug 4497. (makedata.mak revision 1.117)
|
|
|
|
#
|
2005-03-25 05:40:51 +00:00
|
|
|
!IFDEF ICUDATA_SOURCE_ARCHIVE
|
2006-03-27 17:40:56 +00:00
|
|
|
"$(ICU_LIB_TARGET)" : $(COMMON_ICUDATA_DEPENDENCIES) "$(ICUDATA_SOURCE_ARCHIVE)"
|
2005-03-25 05:40:51 +00:00
|
|
|
@echo Building icu data from $(ICUDATA_SOURCE_ARCHIVE)
|
|
|
|
cd "$(ICUBLD_PKG)"
|
2008-08-12 04:41:41 +00:00
|
|
|
"$(ICUPBIN)\icupkg" -x * --list "$(ICUDATA_SOURCE_ARCHIVE)" > "$(ICUTMP)\icudata.lst"
|
|
|
|
"$(ICUPBIN)\pkgdata" $(COMMON_ICUDATA_ARGUMENTS) "$(ICUTMP)\icudata.lst"
|
2005-03-25 05:40:51 +00:00
|
|
|
copy "$(U_ICUDATA_NAME).dll" "$(DLL_OUTPUT)"
|
|
|
|
-@erase "$(U_ICUDATA_NAME).dll"
|
2006-12-16 21:04:13 +00:00
|
|
|
copy "$(ICUTMP)\$(ICUPKG).dat" "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat"
|
|
|
|
-@erase "$(ICUTMP)\$(ICUPKG).dat"
|
2005-03-25 05:40:51 +00:00
|
|
|
!ELSE
|
2018-08-25 06:39:10 +00:00
|
|
|
"$(ICU_LIB_TARGET)" : $(COMMON_ICUDATA_DEPENDENCIES) $(COREDATA_TS)
|
|
|
|
@echo Building ICU data from scratch
|
2005-03-25 05:40:51 +00:00
|
|
|
cd "$(ICUBLD_PKG)"
|
2018-08-25 06:39:10 +00:00
|
|
|
"$(ICUPBIN)\pkgdata" $(COMMON_ICUDATA_ARGUMENTS) $(ICUTMP)\icudata.lst
|
2006-03-27 17:40:56 +00:00
|
|
|
-@erase "$(ICU_LIB_TARGET)"
|
2018-08-25 06:39:10 +00:00
|
|
|
@if not exist "$(DLL_OUTPUT)" mkdir "$(DLL_OUTPUT)"
|
2006-03-27 17:40:56 +00:00
|
|
|
copy "$(U_ICUDATA_NAME).dll" "$(ICU_LIB_TARGET)"
|
2004-05-06 00:39:17 +00:00
|
|
|
-@erase "$(U_ICUDATA_NAME).dll"
|
2006-12-16 21:04:13 +00:00
|
|
|
copy "$(ICUTMP)\$(ICUPKG).dat" "$(ICUOUT)\$(U_ICUDATA_NAME)$(U_ICUDATA_ENDIAN_SUFFIX).dat"
|
|
|
|
-@erase "$(ICUTMP)\$(ICUPKG).dat"
|
2005-03-25 05:40:51 +00:00
|
|
|
!ENDIF
|
2003-10-05 23:44:30 +00:00
|
|
|
|
2005-09-20 07:15:06 +00:00
|
|
|
# utility target to create missing directories
|
2018-08-25 06:39:10 +00:00
|
|
|
# Most directories are made by Python, but still create ICUTMP
|
|
|
|
# so it works in the source archive
|
2005-09-20 07:15:06 +00:00
|
|
|
CREATE_DIRS :
|
2002-01-24 02:28:22 +00:00
|
|
|
@if not exist "$(ICUOUT)\$(NULL)" mkdir "$(ICUOUT)"
|
2004-04-14 19:39:08 +00:00
|
|
|
@if not exist "$(ICUTMP)\$(NULL)" mkdir "$(ICUTMP)"
|
2004-04-22 22:20:35 +00:00
|
|
|
@if not exist "$(ICUOUT)\build\$(NULL)" mkdir "$(ICUOUT)\build"
|
2005-03-25 05:40:51 +00:00
|
|
|
@if not exist "$(ICUBLD_PKG)\$(NULL)" mkdir "$(ICUBLD_PKG)"
|
2005-09-20 07:15:06 +00:00
|
|
|
|
|
|
|
# utility target to send us to the right dir
|
|
|
|
GODATA : CREATE_DIRS
|
2005-03-25 05:40:51 +00:00
|
|
|
@cd "$(ICUBLD_PKG)"
|
2000-12-03 04:09:23 +00:00
|
|
|
|
|
|
|
# This is to remove all the data files
|
2002-02-05 19:04:56 +00:00
|
|
|
CLEAN : GODATA
|
2001-09-18 00:02:52 +00:00
|
|
|
@echo Cleaning up the data files.
|
2005-03-25 05:40:51 +00:00
|
|
|
@cd "$(ICUBLD_PKG)"
|
2000-12-03 04:09:23 +00:00
|
|
|
-@erase "*.cnv"
|
2002-05-13 17:26:51 +00:00
|
|
|
-@erase "*.exp"
|
2002-07-18 00:26:33 +00:00
|
|
|
-@erase "*.icu"
|
2002-05-13 17:26:51 +00:00
|
|
|
-@erase "*.lib"
|
2010-01-06 23:50:03 +00:00
|
|
|
-@erase "*.nrm"
|
2002-03-08 01:57:46 +00:00
|
|
|
-@erase "*.res"
|
2003-08-31 16:47:59 +00:00
|
|
|
-@erase "*.spp"
|
2004-07-13 14:32:53 +00:00
|
|
|
-@erase "*.txt"
|
2009-03-09 23:40:15 +00:00
|
|
|
-@erase "*.cfu"
|
2009-11-13 14:39:02 +00:00
|
|
|
-@erase "curr\*.res"
|
|
|
|
-@erase "curr\*.txt"
|
|
|
|
-@erase "lang\*.res"
|
|
|
|
-@erase "lang\*.txt"
|
|
|
|
-@erase "region\*.res"
|
|
|
|
-@erase "region\*.txt"
|
|
|
|
-@erase "zone\*.res"
|
|
|
|
-@erase "zone\*.txt"
|
2006-03-23 09:46:37 +00:00
|
|
|
@cd "$(ICUBLD_PKG)\$(ICUBRK)"
|
|
|
|
-@erase "*.brk"
|
|
|
|
-@erase "*.res"
|
|
|
|
-@erase "*.txt"
|
2014-10-10 23:44:31 +00:00
|
|
|
-@erase "*.dict"
|
2005-03-25 05:40:51 +00:00
|
|
|
@cd "$(ICUBLD_PKG)\$(ICUCOL)"
|
2004-07-13 08:08:17 +00:00
|
|
|
-@erase "*.res"
|
2004-07-13 14:32:53 +00:00
|
|
|
-@erase "*.txt"
|
2005-03-25 05:40:51 +00:00
|
|
|
@cd "$(ICUBLD_PKG)\$(ICURBNF)"
|
2004-07-14 18:35:16 +00:00
|
|
|
-@erase "*.res"
|
|
|
|
-@erase "*.txt"
|
2009-03-09 23:40:15 +00:00
|
|
|
@cd "$(ICUBLD_PKG)\$(ICUTRNS)"
|
2004-08-02 20:06:55 +00:00
|
|
|
-@erase "*.res"
|
2002-03-08 01:57:46 +00:00
|
|
|
@cd "$(ICUOUT)"
|
|
|
|
-@erase "*.dat"
|
2004-07-13 14:32:53 +00:00
|
|
|
@cd "$(ICUTMP)"
|
2006-12-14 04:26:41 +00:00
|
|
|
-@erase "*.html"
|
2006-01-03 17:59:44 +00:00
|
|
|
-@erase "*.lst"
|
2004-07-13 14:32:53 +00:00
|
|
|
-@erase "*.mak"
|
|
|
|
-@erase "*.obj"
|
|
|
|
-@erase "*.res"
|
2018-08-25 06:39:10 +00:00
|
|
|
-@erase "*.timestamp"
|
2002-03-08 01:57:46 +00:00
|
|
|
@cd "$(TESTDATABLD)"
|
2003-08-31 16:47:59 +00:00
|
|
|
-@erase "*.cnv"
|
|
|
|
-@erase "*.icu"
|
2002-03-08 01:57:46 +00:00
|
|
|
-@erase "*.mak"
|
2012-06-11 18:17:05 +00:00
|
|
|
-@erase "*.nrm"
|
2003-08-31 16:47:59 +00:00
|
|
|
-@erase "*.res"
|
|
|
|
-@erase "*.spp"
|
2003-12-07 23:13:00 +00:00
|
|
|
-@erase "*.txt"
|
2001-09-18 00:02:52 +00:00
|
|
|
@cd "$(TESTDATAOUT)"
|
|
|
|
-@erase "*.dat"
|
2006-03-24 01:21:27 +00:00
|
|
|
@cd "$(TESTDATAOUT)\testdata"
|
2003-08-31 16:47:59 +00:00
|
|
|
-@erase "*.typ"
|
2005-03-25 05:40:51 +00:00
|
|
|
@cd "$(ICUBLD_PKG)"
|
2000-12-03 04:09:23 +00:00
|
|
|
|
2000-12-04 21:51:29 +00:00
|
|
|
|
2001-05-10 23:16:00 +00:00
|
|
|
# DLL version information
|
2004-05-17 17:49:49 +00:00
|
|
|
# If you modify this, modify winmode.c in pkgdata.
|
2018-08-25 06:39:10 +00:00
|
|
|
"$(ICUTMP)\icudata.res": "$(ICUSRCDATA)\misc\icudata.rc"
|
2001-05-10 23:16:00 +00:00
|
|
|
@echo Creating data DLL version information from $**
|
2005-01-11 23:35:15 +00:00
|
|
|
@rc.exe /i "..\..\..\..\common" /r /fo $@ $**
|
2001-05-10 23:16:00 +00:00
|
|
|
|
2010-01-06 23:50:03 +00:00
|
|
|
# Targets for prebuilt Unicode data
|
2018-08-25 06:39:10 +00:00
|
|
|
# Needed for ICU4J!
|
2010-04-09 23:30:02 +00:00
|
|
|
"$(ICUBLD_PKG)\pnames.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\pnames.icu
|
|
|
|
"$(ICUPBIN)\icupkg" -tl $? $@
|
|
|
|
|
|
|
|
"$(ICUBLD_PKG)\ubidi.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\ubidi.icu
|
|
|
|
"$(ICUPBIN)\icupkg" -tl $? $@
|
|
|
|
|
|
|
|
"$(ICUBLD_PKG)\ucase.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\ucase.icu
|
|
|
|
"$(ICUPBIN)\icupkg" -tl $? $@
|
|
|
|
|
|
|
|
"$(ICUBLD_PKG)\uprops.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\uprops.icu
|
|
|
|
"$(ICUPBIN)\icupkg" -tl $? $@
|
|
|
|
|
|
|
|
"$(ICUBLD_PKG)\unames.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\unames.icu
|
|
|
|
"$(ICUPBIN)\icupkg" -tl $? $@
|
|
|
|
|
2010-01-06 23:50:03 +00:00
|
|
|
"$(ICUBLD_PKG)\nfc.nrm": $(ICUSRCDATA_RELATIVE_PATH)\in\nfc.nrm
|
|
|
|
"$(ICUPBIN)\icupkg" -tl $? $@
|
|
|
|
|
|
|
|
"$(ICUBLD_PKG)\nfkc.nrm": $(ICUSRCDATA_RELATIVE_PATH)\in\nfkc.nrm
|
|
|
|
"$(ICUPBIN)\icupkg" -tl $? $@
|
|
|
|
|
|
|
|
"$(ICUBLD_PKG)\nfkc_cf.nrm": $(ICUSRCDATA_RELATIVE_PATH)\in\nfkc_cf.nrm
|
|
|
|
"$(ICUPBIN)\icupkg" -tl $? $@
|
|
|
|
|
2010-06-15 15:54:53 +00:00
|
|
|
"$(ICUBLD_PKG)\uts46.nrm": $(ICUSRCDATA_RELATIVE_PATH)\in\uts46.nrm
|
|
|
|
"$(ICUPBIN)\icupkg" -tl $? $@
|
|
|
|
|
2014-08-14 18:47:27 +00:00
|
|
|
"$(ICUBLD_PKG)\coll\ucadata.icu": $(ICUSRCDATA_RELATIVE_PATH)\in\coll\ucadata-unihan.icu
|
2010-04-10 04:14:01 +00:00
|
|
|
"$(ICUPBIN)\icupkg" -tl $? $@
|
|
|
|
|
2009-03-09 23:40:15 +00:00
|
|
|
|
2005-09-20 07:15:06 +00:00
|
|
|
!IFDEF ICUDATA_ARCHIVE
|
2018-08-25 06:39:10 +00:00
|
|
|
"$(ICUDATA_SOURCE_ARCHIVE)": CREATE_DIRS $(ICUDATA_ARCHIVE) $(TOOLS_TS)
|
2017-03-21 01:03:49 +00:00
|
|
|
"$(ICUTOOLS)\icupkg\$(CFGTOOLS)\icupkg" -t$(U_ICUDATA_ENDIAN_SUFFIX) "$(ICUDATA_ARCHIVE)" "$(ICUDATA_SOURCE_ARCHIVE)"
|
2005-09-20 07:15:06 +00:00
|
|
|
!ENDIF
|