Sorry for the first diff, it's against the 1.4.1 version, so rather useless for
you.
Here's the same thing against the current CVS version, also as diff -ruawN:
-----------------------------------------------------------------------------------------------------------
--- NetRexxC.java Fri Mar 29 22:50:44 2002
+++ \NetRexxC.java Fri Mar 29 22:48:58 2002
@@ -57,6 +57,8 @@
import java.io.IOException;
import java.io.StringWriter;
import java.io.PrintWriter;
+import java.io.StringReader;
+import java.io.BufferedReader;
import java.util.Vector;
import java.util.Hashtable;
@@ -567,24 +569,37 @@
StringWriter out = new StringWriter();
int rc = COM.ibm.netrexx.process.NetRexxC.
main(new Rexx(compileArgs), new PrintWriter(out));
-
- if (rc > 1) { // 1 is warnings from real NetRexxC
- log(out.toString(), Project.MSG_ERR);
- String msg = "Compile failed, messages should have been
provided.";
- throw new BuildException(msg);
+ String sdir=srcDir.getAbsolutePath();
+ String ddir=destDir.getAbsolutePath();
+ int dlen=ddir.length();
+ String l;
+ BufferedReader in=new BufferedReader(new
StringReader(out.toString()));
+ log("replacing destdir '"+ddir+"' through sourcedir '"+sdir+"'",
Project.MSG_VERBOSE);
+ while ((l=in.readLine())!=null) {
+ String left,right;
+ int idx;
+ if ((idx=l.indexOf(ddir))!=-1) { // path is mentioned in the
message
+ left=l.substring(0,idx);
+ if (idx+dlen<l.length()) {
+ right=l.substring(idx+dlen);
+ } else {
+ right="";
}
- else if (rc == 1) {
- log(out.toString(), Project.MSG_WARN);
+ l=left+sdir+right;
}
- else {
- log(out.toString(), Project.MSG_INFO);
+ log(l, Project.MSG_ERR);
}
+ if (rc>1) {
+ throw new BuildException("Compile failed, messages should have
been provided.");
+ }
+ } catch (IOException ioe) { // we do not expect this, really?
} finally {
// need to reset java.class.path property
// since the NetRexx compiler has no option for the classpath
currentProperties = System.getProperties();
currentProperties.put("java.class.path", currentClassPath);
}
+
}
/**
-----------------------------------------------------------------------------------------------------
Hope that's of more use for you... :-)
sincerely,
Patric Bechtel
IPCON Informationssysteme
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>