ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet Ilasm.java
Date Fri, 30 Jul 2004 06:33:04 GMT
bodewig     2004/07/29 23:33:04

  Modified:    src/etc/testcases/taskdefs/optional dotnet.xml
               src/main/org/apache/tools/ant/taskdefs/optional/dotnet
                        Ilasm.java
  Log:
  make <ilasm> work on Mono
  
  Revision  Changes    Path
  1.19      +20 -2     ant/src/etc/testcases/taskdefs/optional/dotnet.xml
  
  Index: dotnet.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/optional/dotnet.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- dotnet.xml	3 Dec 2003 10:32:57 -0000	1.18
  +++ dotnet.xml	30 Jul 2004 06:33:04 -0000	1.19
  @@ -272,7 +272,12 @@
       </exec>
     </target>
   
  -  <target name="testILASM"  depends="validate_ilasm"  if="ilasm.found">
  +  <target name="testILASM"
  +    depends="testILASM-Mono,testILASM-MS"
  +    if="ilasm.found"/>
  +
  +  <target name="ilasm" depends="validate_ilasm" 
  +      if="ilasm.found">
       <property name="testILASM.exe"
         location="${build.dir}/ExampleIlasm.exe" />
       <ilasm
  @@ -283,8 +288,21 @@
       </ilasm>
       <available property="ilasm.created" file="${testILASM.exe}"/>
       <fail unless="ilasm.created">No app ${testILASM.exe} created</fail>
  -    <exec executable="${testILASM.exe}" failonerror="true" />
     </target>
  +
  +    <target name="testILASM-MS" depends="ilasm" 
  +      if="ilasm.found" unless="mono.ilasm.found">
  +      <exec executable="${testILASM.exe}"
  +        failonerror="true"/>
  +    </target>
  +
  +    <target name="testILASM-Mono" depends="ilasm" 
  +      if="mono.ilasm.found">
  +      <exec executable="${mono.executable}"
  +        failonerror="true">
  +        <arg value="${testILASM.exe}"/>
  +      </exec>
  +    </target>
   
     <!-- not including this in the test as it creates an exe in the src dir -->
   
  
  
  
  1.37      +20 -1     ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
  
  Index: Ilasm.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- Ilasm.java	9 Mar 2004 16:48:18 -0000	1.36
  +++ Ilasm.java	30 Jul 2004 06:33:04 -0000	1.37
  @@ -28,6 +28,7 @@
   
   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 @@
        */
       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 @@
        *@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;
       }
   
   
  @@ -427,6 +435,17 @@
        */
       public void setTargetType(TargetTypes targetType) {
           this.targetType = targetType.getValue();
  +    }
  +
  +    /**
  +     * Explicitly override the Mono auto-detection.
  +     *
  +     * <p>Defaults to false on Windows and true on any other platform.</p>
  +     *
  +     * @since Ant 1.7
  +     */
  +    public void setMono(boolean b) {
  +        isMono = b;
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message