summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c81500)
raw | patch | inline | side by side (parent: 7c81500)
author | ishmal <ishmal@users.sourceforge.net> | |
Fri, 14 Mar 2008 21:02:07 +0000 (21:02 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Fri, 14 Mar 2008 21:02:07 +0000 (21:02 +0000) |
buildtool.cpp | patch | blob | history |
diff --git a/buildtool.cpp b/buildtool.cpp
index c1028c5260fa45d457311fb1f109940507fa845f..24de4107707c2b85a5a98f9db964da2a0268e310 100644 (file)
--- a/buildtool.cpp
+++ b/buildtool.cpp
*
*/
-#define BUILDTOOL_VERSION "BuildTool v0.7.5, 2007 Bob Jamison"
+#define BUILDTOOL_VERSION "BuildTool v0.7.6, 2007-2008 Bob Jamison"
#include <stdio.h>
#include <fcntl.h>
String cmd = command;
cmd.append(" -d ");
cmd.append(destdir);
+ cmd.append(" -classpath ");
+ cmd.append(destdir);
cmd.append(" -sourcepath ");
cmd.append(srcdir);
cmd.append(" ");
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<fileList.size() ; i++)
{
String fname = fileList[i];
if (!isNewerThan(fullSrc, fullDest))
continue;
- String execCmd = cmd;
- execCmd.append(fullSrc);
+ count++;
+ fprintf(f, "%s\n", fullSrc.c_str());
+ }
+ fclose(f);
+ if (!count)
+ {
+ status(" : nothing to do");
+ return true;
+ }
- String outString, errString;
- bool ret = executeCommand(execCmd.c_str(), "", outString, errString);
- if (!ret)
- {
- error("<javac> 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("<javac> command '%s' failed :\n %s",
+ execCmd.c_str(), errString.c_str());
+ return false;
}
return true;
}