From 8650673e424275eba3035cc0041e38c8e5f2f2f7 Mon Sep 17 00:00:00 2001 From: ishmal Date: Fri, 14 Mar 2008 21:02:07 +0000 Subject: [PATCH] Improve buggy, slow invocation of javac --- buildtool.cpp | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/buildtool.cpp b/buildtool.cpp index c1028c526..24de41077 100644 --- a/buildtool.cpp +++ b/buildtool.cpp @@ -38,7 +38,7 @@ * */ -#define BUILDTOOL_VERSION "BuildTool v0.7.5, 2007 Bob Jamison" +#define BUILDTOOL_VERSION "BuildTool v0.7.6, 2007-2008 Bob Jamison" #include #include @@ -6693,6 +6693,8 @@ public: String cmd = command; cmd.append(" -d "); cmd.append(destdir); + cmd.append(" -classpath "); + cmd.append(destdir); cmd.append(" -sourcepath "); cmd.append(srcdir); cmd.append(" "); @@ -6702,6 +6704,9 @@ public: cmd.append(target); cmd.append(" "); } + String fname = "javalist.btool"; + FILE *f = fopen(fname.c_str(), "w"); + int count = 0; for (unsigned int i=0 ; i command '%s' failed :\n %s", - execCmd.c_str(), errString.c_str()); - return false; - } + status(" : compiling %d files", count); + + String execCmd = cmd; + execCmd.append("@"); + execCmd.append(fname); + + String outString, errString; + bool ret = executeCommand(execCmd.c_str(), "", outString, errString); + if (!ret) + { + error(" command '%s' failed :\n %s", + execCmd.c_str(), errString.c_str()); + return false; } return true; } -- 2.30.2