ICU-7336 restore build steps on C/unix

X-SVN-Rev: 27477
This commit is contained in:
Steven R. Loomis 2010-02-02 21:49:58 +00:00
parent 096cd6d256
commit 7a93a3c3e2
5 changed files with 66 additions and 67 deletions

View file

@ -65,7 +65,7 @@ EXTRA_DATA =
install-recursive clean clean-local clean-recursive distclean \
distclean-local distclean-recursive doc dist dist-local dist-recursive \
check check-local check-recursive clean-recursive-with-twist install-icu \
doc install-doc tests
doc install-doc tests icu4j-data icu4j-data-install
## Clear suffix list
.SUFFIXES :
@ -245,3 +245,7 @@ config/%.$(SECTION): $(srcdir)/config/%.$(SECTION).in
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
icu4j-data-install icu4j-data: all tests
@echo ICU4J_ROOT=$(ICU4J_ROOT)
@$(MAKE) -C test/testdata $@
@$(MAKE) -C data $@

View file

@ -786,22 +786,29 @@ $(OUTDIR)/icu4j/icudata.jar: build-dir packagedata $(OUTTMPDIR)/$(ICUDATA_PLATFO
$(INVOKE) $(TOOLBINDIR)/icupkg $(OUTTMPDIR)/$(ICUDATA_PLATFORM_NAME).dat $(OUTDIR)/icu4j/$(ICUDATA_BASENAME_VERSION)b.dat -a $(OUTDIR)/icu4j/add.txt -s $(BUILDDIR) -x '*' -tb -d $(OUTDIR)/icu4j/com/ibm/icu/impl/data/$(ICUDATA_BASENAME_VERSION)b
$(JAR) cf $(OUTDIR)/icu4j/icudata.jar -C $(OUTDIR)/icu4j com/ibm/icu/impl/data/$(ICUDATA_BASENAME_VERSION)b
ICU4J_DATA=$(OUTDIR)/icu4j/icudata.jar
ifdef ICU4J_ROOT
ICU4J_DATA_INSTALLED=$(ICU4J_ROOT)/main/shared/data/icudata.jar
$(ICU4J_ROOT)/main/shared/data/icudata.jar: $(OUTDIR)/icu4j/icudata.jar
mkdir -p $(ICU4J_ROOT)/main/shared/data
cp $(OUTDIR)/icu4j/icudata.jar $(ICU4J_ROOT)/main/shared/data
icudata.jar: build-dir $(ICU4J_ROOT)/main/shared/data/icudata.jar
icu4j-data-install: $(ICU4J_DATA_INSTALLED)
else
icudata.jar: build-dir $(OUTDIR)/icu4j/icudata.jar
icu4j-data-install: icu4j-data
@echo data is built into $(OUTDIR)/icu4j
@echo '** Error:' ICU4J_ROOT was not set, could not install
exit 1
endif
build-icu4j: all
$(MAKE) -C ../tools/genrb $@
icu4j-data: $(ICU4J_DATA)
###################################################################
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status

View file

@ -1,5 +1,5 @@
********************************************************************************
* Copyright (C) 2008-2009, International Business Machines Corporation *
* Copyright (C) 2008-2010, International Business Machines Corporation *
* and others. All Rights Reserved. *
* *
* 6/26/08 - Created by Brian Rower - heavy copying from ICU4J readme & others *
@ -19,33 +19,36 @@ In the following,
ICU4C, see the ICU4C readme at:
http://source.icu-project.org/repos/icu/icu/trunk/readme.html#HowToBuild
*Windows*
2. Step 2 depends on whether you are on a Windows or a Unix-type
platform.
2. On the command line, cd to $icu4c_root\source\data.
*Windows* (note: still in progress.)
3. Do
nmake -f makedata.mak ICUMAKE=$icu4c_root\source\data\ CFG=x86\Release JAR="$jdk_bin\jar" ICU4J_ROOT=$icu4j_root icudata.jar testdata.jar
2a. On the command line, cd to $icu4c_root\source\data.
2b. Do
nmake -f makedata.mak ICUMAKE=$icu4c_root\source\data\ CFG=x86\Release JAR="$jdk_bin\jar" ICU4J_ROOT=$icu4j_root icu4j-data-install
Continue with step 3, in Java:
(You can omit the ICU4J_ROOT argument to skip the final copying.)
*Linux*
$icu4c_build is the ICU4C root build directory,
which is $icu4c_root/source in an in-source build
2. On the command line, cd to $icu4c_build/data.
2c. On the command line, cd to $icu4c_build
3. Do
make JAR=$jdk_bin/jar ICU4J_ROOT=$icu4j_root icudata.jar
cd ../test/testdata
make JAR=$jdk_bin/jar ICU4J_ROOT=$icu4j_root testdata.jar
2d. Do
make JAR=$jdk_bin/jar ICU4J_ROOT=$icu4j_root icu4j-data-install
(You can omit the ICU4J_ROOT argument to skip the final copying.)
(You can omit the JAR if it's just jar.)
(You can omit the JAR if it's just jar.)
Continue with step 3, in Java:
*Java*
After the ICU4C-side steps above, build the core-data and core-test-data targets of the
3. After the ICU4C-side steps above, build the core-data and core-test-data targets of the
ICU4J ant build to unpack the jar files with the following commands:
cd $icu4j_root

View file

@ -29,7 +29,7 @@ SUBDIRS =
.PHONY : all all-local all-recursive install install-local \
install-recursive clean clean-local clean-recursive distclean \
distclean-local distclean-recursive doc dist dist-local dist-recursive \
check check-local check-recursive build-dir java-output testdata.jar
check check-local check-recursive build-dir testdata.jar
.NOTPARALLEL: build-dir
@ -152,14 +152,6 @@ $(TESTBUILDDIR)/test.icu: $(GENTEST)
$(TESTBUILDDIR)/testtable32.txt: $(GENTEST)
$(INVOKE) $(GENTEST) -r -d $(TESTBUILDDIR)
# java output
java-output: $(JAVA_OUT_DIR)/DebugUtilitiesData.java
$(JAVA_OUT_DIR)/DebugUtilitiesData.java: $(GENTEST)
$(MKINSTALLDIRS) $(JAVA_OUT_DIR)
$(INVOKE) $(GENTEST) -j -d $(JAVA_OUT_DIR)
$(TESTBUILDDIR)/testtable32.res: $(TESTBUILDDIR)/testtable32.txt $(TOOLBINDIR)/genrb$(EXEEXT)
$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -s $(TESTBUILDDIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) $(<F)
@ -237,16 +229,36 @@ $(OUTDIR)/icu4j/testdata.jar: build-dir testdata $(TESTOUTDIR)/testdata.dat
$(INVOKE) $(TOOLBINDIR)/icupkg $(TESTOUTDIR)/testdata.dat -r test.icu -x '*' -tb -d $(OUTDIR)/icu4j/com/ibm/icu/dev/data/testdata
$(JAR) cf $(OUTDIR)/icu4j/testdata.jar -C $(OUTDIR)/icu4j com/ibm/icu/dev/data/testdata
DEBUGUTILITIESDATA_DIR=main/tests/core/src/com/ibm/icu/dev/test/util
DEBUGUTILITIESDATA_SRC=DebugUtilitiesData.java
ICU4J_DATA=$(OUTDIR)/icu4j/src/$(DEBUGUTILITIESDATA_SRC) $(OUTDIR)/icu4j/testdata.jar
$(OUTDIR)/icu4j/src/$(DEBUGUTILITIESDATA_SRC): $(GENTEST)
mkdir -p $(OUTDIR)/icu4j/src
$(INVOKE) $(GENTEST) -j -d $(OUTDIR)/icu4j/src
ifdef ICU4J_ROOT
icu4j-data-install: $(ICU4J_ROOT)/main/shared/data/testdata.jar $(ICU4J_ROOT)/$(DEBUGUTILITIESDATA_DIR)/$(DEBUGUTILITIESDATA_SRC)
@echo ICU4J test data installed in $(ICU4J_ROOT)
$(ICU4J_ROOT)/main/shared/data/testdata.jar: $(OUTDIR)/icu4j/testdata.jar
mkdir -p $(ICU4J_ROOT)/main/shared/data
cp $(OUTDIR)/icu4j/testdata.jar $(ICU4J_ROOT)/main/shared/data
testdata.jar: build-dir $(ICU4J_ROOT)/main/shared/data/testdata.jar
$(ICU4J_ROOT)/$(DEBUGUTILITIESDATA_DIR)/$(DEBUGUTILITIESDATA_SRC): $(OUTDIR)/icu4j/src/$(DEBUGUTILITIESDATA_SRC)
mkdir -p $(ICU4J_ROOT)/$(DEBUGUTILITIESDATA_DIR)
cp $^ $@
else
testdata.jar: build-dir $(OUTDIR)/icu4j/testdata.jar
icu4j-data-install: $(ICU4J_DATA)
@echo ICU4J data was built into $(OUTDIR)/icu4j
@echo '** Error:' ICU4J_ROOT was not set, could not install
exit 1
endif
icu4j-data: $(ICU4J_DATA)

View file

@ -1,7 +1,7 @@
/*
*******************************************************************************
*
* Copyright (C) 1999-2009, International Business Machines
* Copyright (C) 1999-2010, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@ -160,8 +160,10 @@ outputJavaStuff(const char* progname, const char *outputDir) {
return 1;
}
fprintf(out, "/** Copyright (C) %d, International Business Machines Corporation and Others. All Rights Reserved. **/\n\n", year);
fprintf(out, "/* NOTE: this file is AUTOMATICALLY GENERATED by gentest. */\n\n");
fprintf(out, "/** Copyright (C) 2007-%d, International Business Machines Corporation and Others. All Rights Reserved. **/\n\n", year);
fprintf(out, "/* NOTE: this file is AUTOMATICALLY GENERATED by gentest.\n"
" * See: {ICU4C}/source/data/icu4j-readme.txt for more information. \n"
" **/\n\n");
fprintf(out, "package com.ibm.icu.dev.test.util;\n\n");
fprintf(out, "public class DebugUtilitiesData extends Object {\n");
fprintf(out, " public static final String ICU4C_VERSION=\"%s\";\n", U_ICU_VERSION);
@ -199,11 +201,12 @@ outputJavaStuff(const char* progname, const char *outputDir) {
#if !UCONFIG_NO_FORMATTING
case UDBG_UCalendarDateFields:
case UDBG_UCalendarMonths:
/* Temporary workaround for IS_LEAP_MOTH #6051 */
/* Temporary workaround for IS_LEAP_MONTH #6051 */
if (t == UDBG_UCalendarDateFields && i == 22) {
fprintf(out, "com.ibm.icu.util.ChineseCalendar.%s, /* %d */", udbg_enumName((UDebugEnumType)t,i), i);
} else
fprintf(out, "com.ibm.icu.util.Calendar.%s, /* %d */", udbg_enumName((UDebugEnumType)t,i), i);
fprintf(out, "com.ibm.icu.util.ChineseCalendar.%s, /* %d */", udbg_enumName((UDebugEnumType)t,i), i);
} else {
fprintf(out, "com.ibm.icu.util.Calendar.%s, /* %d */", udbg_enumName((UDebugEnumType)t,i), i);
}
break;
#endif
case UDBG_UDebugEnumType:
@ -221,34 +224,4 @@ outputJavaStuff(const char* progname, const char *outputDir) {
return 0;
#if 0
int32_t count = udbg_enumCount((UDebugEnumType)t);
if(count == -1) {
fprintf(stderr,"%s: enumCount(%d) returned -1\n", progname, count);
return 1;
}
for(t=0;t<=UDBG_ENUM_COUNT;t++) {
int32_t count = udbg_enumCount((UDebugEnumType)t);
if(count == -1) {
fprintf(stderr,"%s: enumCount(%d) returned -1\n", progname, count);
return 1;
}
for(i=0;i<=count;i++) {
if(i<count) {
if( i!=udbg_enumArrayValue((UDebugEnumType)t, i)) {
fprintf(stderr, "%s: FAIL: udbg_enumArrayValue(%d,%d) returned %d, expected %d\n", progname, t, i, udbg_enumArrayValue((UDebugEnumType)t,i), i);
return 1;
}
}
fprintf(stderr, "%s: udbg_enumArrayValue(%d,%d) = %s, returned %d\n", progname, t, i,
udbg_enumName((UDebugEnumType)t,i), udbg_enumArrayValue((UDebugEnumType)t,i));
}
if(udbg_enumExpectedCount((UDebugEnumType)t) != count) {
fprintf(stderr, "%s: FAIL: udbg_enumExpectedCount(%d): %d, != UCAL_FIELD_COUNT=%d \n", progname, t, udbg_enumExpectedCount((UDebugEnumType)t), count);
return 1;
} else {
fprintf(stderr, "%s: udbg_ucal_fieldCount: %d, UCAL_FIELD_COUNT=udbg_enumCount %d ", progname, udbg_enumExpectedCount((UDebugEnumType)t), count);
}
}
#endif
}