ICU-4567 DebugUtilitiesData generation from C

X-SVN-Rev: 22004
This commit is contained in:
Steven R. Loomis 2007-07-16 22:07:35 +00:00
parent 707a17fae1
commit db71bd3ffe
3 changed files with 10 additions and 3 deletions

2
.gitignore vendored
View File

@ -514,6 +514,7 @@ icu4c/source/tools/genrb/*.pdb
icu4c/source/tools/genrb/*.plg
icu4c/source/tools/genrb/Debug
icu4c/source/tools/genrb/Makefile
icu4c/source/tools/genrb/Makefile.local
icu4c/source/tools/genrb/Release
icu4c/source/tools/genrb/debug
icu4c/source/tools/genrb/derb
@ -524,6 +525,7 @@ icu4c/source/tools/genrb/genrb
icu4c/source/tools/genrb/genrb.[0-9]
icu4c/source/tools/genrb/genrb.vcproj.*.*.user
icu4c/source/tools/genrb/release
icu4c/source/tools/genrb/temp
icu4c/source/tools/gensprep/*.8
icu4c/source/tools/gensprep/*.d
icu4c/source/tools/gensprep/*.o

View File

@ -153,7 +153,7 @@ sub buildICU{
cmd("make uni-core-data", $verbose);
if(chdir($icuTestDataSrcDir)){
print("Invoking make in directory $icuTestDataSrcDir\n");
cmd("make", $verbose);
cmd("make JAVA_OUT_DIR=\"$icu4jDir/src/com/ibm/icu/dev/test/util/\" all java-output", $verbose);
}else{
die "Could not cd to $icuTestDataSrcDir\n";
}
@ -163,14 +163,14 @@ sub buildICU{
chdir($icuSrcDataDir);
cmd("gmake uni-core-data", $verbose);
chdir($icuTestDataDir."../../");
cmd("gmake", $verbose);
cmd("gmake JAVA_OUT_DIR=\"$icu4jDir/src/com/ibm/icu/dev/test/util/\" all java-output", $verbose);
}elsif($platform eq "MSWin32"){
#devenv.com $projectFileName \/build $configurationName > \"$cLogFile\" 2>&1
cmd("devenv.com allinone/allinone.sln /useenv /build Debug", $verbose);
# build required data. this is required coz building icu will not build all the data
chdir($icuSrcDataDir);
cmd("NMAKE /f makedata.mak ICUMAKE=\"$icuSrcDataDir\" CFG=debug uni-core-data", $verbose);
print "WARNING: Don't know how to build java-output on $platform. \n";
}else{
print "ERROR: Could not build ICU unknown platform $platform. \n";
exit(-1);

View File

@ -159,8 +159,13 @@ outputJavaStuff(const char* progname, const char *outputDir) {
}
fprintf(out, "/** Copyright (C) 2007, International Business Machines Corporation and Others. All Rights Reserved. **/\n\n");
fprintf(out, "/* NOTE: this file is AUTOMATICALLY GENERATED by gentest. */\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);
for(t=0;t<UDBG_ENUM_COUNT;t++) {
fprintf(out, " public static final int %s = %d;\n", udbg_enumName(UDBG_UDebugEnumType,t), t);
}
fprintf(out, " public static final String [] TYPES = { \n");
for(t=0;t<UDBG_ENUM_COUNT;t++) {
fprintf(out, " \"%s\", /* %d */\n", udbg_enumName(UDBG_UDebugEnumType,t), t);