From db71bd3ffe3b8ea3322ce1aa12214ecc4740bf2f Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Mon, 16 Jul 2007 22:07:35 +0000 Subject: [PATCH] ICU-4567 DebugUtilitiesData generation from C X-SVN-Rev: 22004 --- .gitignore | 2 ++ icu4c/source/tools/genrb/gendtjar.pl | 6 +++--- icu4c/source/tools/gentest/gentest.c | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index eb553729d5..c6052dafe5 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/icu4c/source/tools/genrb/gendtjar.pl b/icu4c/source/tools/genrb/gendtjar.pl index 61857e3576..0d413f2d75 100755 --- a/icu4c/source/tools/genrb/gendtjar.pl +++ b/icu4c/source/tools/genrb/gendtjar.pl @@ -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); diff --git a/icu4c/source/tools/gentest/gentest.c b/icu4c/source/tools/gentest/gentest.c index 4902ba35c7..8c044b50a4 100644 --- a/icu4c/source/tools/gentest/gentest.c +++ b/icu4c/source/tools/gentest/gentest.c @@ -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