ICU-6279 Updated ICU4J data make file and added icu4j-readme.txt with instructions for building icu4j data.

X-SVN-Rev: 24475
This commit is contained in:
Brian Rower 2008-08-08 19:22:26 +00:00
parent f18b601af1
commit 2fd8a84a0d
3 changed files with 108 additions and 27 deletions

1
.gitattributes vendored
View file

@ -59,6 +59,7 @@ icu4c/source/data/coll/pa_Guru_IN.txt -text
icu4c/source/data/coll/ur.txt -text
icu4c/source/data/coll/ur_IN.txt -text
icu4c/source/data/coll/ur_PK.txt -text
icu4c/source/data/icu4j-readme.txt -text
icu4c/source/data/locales/fr_SN.txt -text
icu4c/source/data/locales/ha.txt -text
icu4c/source/data/locales/ha_Latn.txt -text

View file

@ -0,0 +1,78 @@
********************************************************************************
* Copyright (C) 2008, International Business Machines Corporation *
* and others. All Rights Reserved. *
* *
* 6/26/08 - Created by Brian Rower - heavy copying from ICU4J readme & others *
* *
********************************************************************************
Procedures for building ICU4J data from ICU4C data on a Unix system:
1. Download and build ICU4C. For more instructions on downloading and building
ICU4C, see the ICU4C readme at:
http://source.icu-project.org/repos/icu/icu/tags/release-3-8/readme.html#HowToBuild
2. In your shell, navigate to $icu4c_root/source/tools/genrb. $icu4c_root is
the root directory of ICU4C source package.
3. Create a new file named "Makefile.local" in this directory. In this file
set the ICU4J_HOME variable to be the root path of ICU4J.
Ex: ICU4J_HOME=/home/srl/icu4j
4. If there are spaces in your Java bin directory path (which is especially
common using cygwin)
(EX: /cygdrive/c/Program Files/Java/jdk1.5.0_15/bin), you may need to
set GENDTJAR_JARHOME in Makefile.local. On a standard Unix based system,
with the Java bin directory in your PATH, this step is not required.
You can set GENDTJAR_JARHOME by hard coding the path to the Java
bin directory.
For example, on Cygwinc (notice the backslash used for the space):
GENDTJAR_JARHOME=/cygdrive/c/Program\ Files/Java/jdk1.5.0_15/bin
5. In this same directory $icu4c_root/source/tools/genrb,
run the command 'make build-icu4j'
6. Build the resources target of the ICU4J ant build to unpack the jar files
with the following commands:
cd $icu4j_root
ant resources
********************************************************************************
If the above procedure fails to work, you may attempt to use the
old procedure which uses less automation & path "guessing":
1. Download and build ICU4C. For more instructions on downloading and building
ICU4C, see the ICU4C readme at:
http://source.icu-project.org/repos/icu/icu/tags/release-3-8/readme.html#HowToBuild
2. Change directory to $icu4c_root/source/tools/genrb. $icu4c_root is the root
directory of ICU4C source package.
3. Run gendtjar.pl from that directory itself with the command:
./gendtjar.pl --icu-root=$icu4c_root --jar=$jdk_home/bin
--icu4j-root=$icu4j_root
e.g.
./gendtjar.pl --icu-root=$HOME/icu4c --jar=/usr/local/bin/java/bin/ --icu4j-root=$HOME/icu4j
Execution of gendtjar.pl script will create the required jar files in
$icu4c_root/source/tools/genrb/temp and then copy them to their
final locations in the ICU4J structure:
$icu4j_root/src/com/ibm/icu/impl/data
and
$icu4j_root/src/com/ibm/icu/dev/data.
4. Build resources target of ant to unpack the jar files
with the following commands:
cd $icu4j_root
ant resources
Note: if gendtjar.pl does not work, the --verbose option can help in
debugging why it went wrong.
********************************************************************************

View file

@ -1,28 +1,14 @@
## Makefile.in for ICU - tools/genrb
## Copyright (c) 1999-2008, International Business Machines Corporation and
## others. All Rights Reserved.
# SIMPLIFIED WAY TO BUILD ICU4J DATA FROM C
#
# Note: do NOT edit this file, Makefile or Makefile.in
# Create a new file, Makefile.local
#
# 1. Need to set the following variable in Makefile.local:
#
# ICU4J_HOME example: ICU4J_HOME=/home/srl/icu4j
# Path to your icu4j directory. Should contain build.xml
# If not set, will create a 'icu4j' directory in source/tools/genrb/icu4j
#
# 2. The next variable can be set by uncommenting and copying the following line to your Makefile.local.GENDTJAR_JARHOME
#
## GENDTJAR_JARHOME:=$(shell dirname `which jar`)
## (uncomment the above line and copy to Makefile.local)
#
# GENDTJAR_JARHOME is the directory containing the 'jar' binary, such as /usr/bin
#################################################################################
## Makefile.in for ICU - tools/genrb #
## Copyright (c) 1999-2008, International Business Machines Corporation and #
## others. All Rights Reserved. #
#################################################################################
#
#
# For Help with this Makefile and the procedures for generating ICU4J data, please see
# "icu4j-readme.txt" in $icu4c_root/source/data
#
#
# 3. Now, you can run 'make build-icu4j' from icu/source/data (convenience)
# or icu/source/tools/genrb (this directory)
## Source directory information
@ -76,6 +62,19 @@ ifeq (,$(ICU4J_HOME))
ICU4J_HOME=$(shell pwd)/icu4j
endif
##Added by Brian Rower 6/25/08
##if JAVA_HOME was not set, try to set it by finding jar
ifeq (,$(JAVA_HOME))
JAVA_HOME=$(shell dirname `which jar`)
endif
##if GENDTJAR_JARHOME (the directory that "jar" lives in) is not set
##set it equal to $JAVA_HOME/bin
ifeq (,$(GENDTJAR_JARHOME))
GENDTJAR_JARHOME=""$(JAVA_HOME)"/bin"
endif
## List of phony targets
.PHONY : all all-local install install-local clean clean-local \
@ -127,14 +126,17 @@ $(DERB) : $(DERB_OBJ)
$(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
$(POST_BUILD_STEP)
$(GENDTJAR_JARHOME)/jar:
@echo $@ not found - make sure GENDTJAR_JARHOME is set. See Makefile.in
exit 1
#$(GENDTJAR_JARHOME)/jar:
# @echo $@ not found - make sure GENDTJAR_JARHOME is set. See Makefile.in
# exit 1
$(ICU4J_HOME)/build.xml:
@echo warning: $@ not found - make sure ICU4J_HOME is set.
build-icu4j: $(GENDTJAR) $(ICU4J_HOME)/build.xml $(GENDTJAR_JARHOME)/jar
#Removed GENDTJAR_JARHOME dependancy. If the file path happens to contain a space in it,
#having it as a target will cause it to error out when it thinks that there are TWO targets. - Brian Rower 6/25/08
build-icu4j: $(GENDTJAR) $(ICU4J_HOME)/build.xml #$(GENDTJAR_JARHOME)/jar
# clean up old temp files
-$(RMV) $(GENDTJAR_TEMP)
perl $(GENDTJAR) $(GENDTJAR_OPTS)