From 4c30dd5d53d63ae6e3191ba5650af8c83854b0ac Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 30 Jul 2004 06:33:04 +0000 Subject: [PATCH] make work on Mono git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276733 13f79535-47bb-0310-9956-ffa450edef68 --- .../testcases/taskdefs/optional/dotnet.xml | 22 +++++++++++++++++-- .../ant/taskdefs/optional/dotnet/Ilasm.java | 21 +++++++++++++++++- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/etc/testcases/taskdefs/optional/dotnet.xml b/src/etc/testcases/taskdefs/optional/dotnet.xml index d592a2013..43e86fd40 100644 --- a/src/etc/testcases/taskdefs/optional/dotnet.xml +++ b/src/etc/testcases/taskdefs/optional/dotnet.xml @@ -272,7 +272,12 @@ - + + + No app ${testILASM.exe} created - + + + + + + + + + + diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java index d6a700b54..a9adaf59e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java @@ -28,6 +28,7 @@ import java.util.Vector; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; +import org.apache.tools.ant.taskdefs.condition.Os; import org.apache.tools.ant.types.EnumeratedAttribute; import org.apache.tools.ant.types.FileSet; @@ -130,6 +131,10 @@ public class Ilasm */ protected Vector referenceFilesets = new Vector(); + /** + * @since Ant 1.7 + */ + private boolean isMono = !Os.isFamily("windows"); /** * constructor inits everything and set up the search pattern @@ -262,7 +267,10 @@ public class Ilasm *@return the appropriate string from the state of the listing flag */ protected String getListingParameter() { - return listing ? "/listing" : "/nolisting"; + if (!isMono) { + return listing ? "/listing" : "/nolisting"; + } + return null; } @@ -429,6 +437,17 @@ public class Ilasm this.targetType = targetType.getValue(); } + /** + * Explicitly override the Mono auto-detection. + * + *

Defaults to false on Windows and true on any other platform.

+ * + * @since Ant 1.7 + */ + public void setMono(boolean b) { + isMono = b; + } + /** * This is the execution entry point. Build a list of files and call ilasm * on each of them.