summaryrefslogtreecommitdiff
path: root/src/main/java/net/sf
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2010-01-08 15:54:21 +0100
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2010-01-08 15:54:21 +0100
commit6ead132ac90477e493e9f9cb1e3c66c1bcb91b14 (patch)
treecf491312d0bb267c137044c339faf4dae5012011 /src/main/java/net/sf
parentf6f9e43ba7d9295eded58e3baa2b01250ed78cae (diff)
downloadcpptasks-parallel-6ead132ac90477e493e9f9cb1e3c66c1bcb91b14.tar.gz
cpptasks-parallel-6ead132ac90477e493e9f9cb1e3c66c1bcb91b14.tar.bz2
cpptasks-parallel-6ead132ac90477e493e9f9cb1e3c66c1bcb91b14.tar.xz
cpptasks-parallel-6ead132ac90477e493e9f9cb1e3c66c1bcb91b14.zip
Trying to debug NAR-128
Diffstat (limited to 'src/main/java/net/sf')
-rw-r--r--src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java b/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java
index 2dde1a0..d167823 100644
--- a/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java
+++ b/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java
@@ -33,6 +33,7 @@ import net.sf.antcontrib.cpptasks.TargetDef;
import net.sf.antcontrib.cpptasks.VersionInfo;
import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.taskdefs.condition.Os;
import org.apache.tools.ant.types.Environment;
@@ -335,12 +336,11 @@ public abstract class CommandLineLinker extends AbstractLinker
*/
protected String prepareFilename(StringBuffer buf,
String outputDir, String sourceFile) {
- String relativePath = CUtil.getRelativePath(outputDir,
- new File(sourceFile));
-// FREEHEP, return the shortest
-// return quoteFilename(buf, sourceFile.length() > relativePath.length() ? relativePath : sourceFile);
-// FREEHEP trying with always absolute paths, as Windows relPaths have a tighter restriction on length than absPaths...
- System.err.println(sourceFile.length()+" "+relativePath.length()+" "+sourceFile);
+// FREEHEP BEGIN return relatuve path if absolute path is too long
+ if (isWindows() && sourceFile.length() > 250) {
+ sourceFile = CUtil.getRelativePath(outputDir, new File(sourceFile));
+ }
+// FREEHEP END
return quoteFilename(buf, sourceFile);
}