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 CSharp.java DotnetBaseMatchingTask.java DotnetCompile.java
Date Mon, 11 Apr 2005 08:39:41 GMT
bodewig     2005/04/11 01:39:41

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/dotnet
                        CSharp.java DotnetBaseMatchingTask.java
                        DotnetCompile.java
  Log:
  mcs on Linux doesn't like quotes in /references.
  
  I guess it is a platform-depenent command line parsing issue rather
  than Mono vs MS, so I madi it conditional on the OS.
  
  Revision  Changes    Path
  1.47      +1 -3      ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
  
  Index: CSharp.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- CSharp.java	14 Mar 2005 12:10:23 -0000	1.46
  +++ CSharp.java	11 Apr 2005 08:39:40 -0000	1.47
  @@ -33,8 +33,6 @@
   
   import java.io.File;
   
  -import org.apache.tools.ant.taskdefs.condition.Os;
  -
   // ====================================================================
   
   /**
  @@ -160,7 +158,7 @@
           unsafe = false;
           noconfig = false;
           definitions = null;
  -        setExecutable(Os.isFamily("windows") ? "csc" : "mcs");
  +        setExecutable(isWindows ? "csc" : "mcs");
       }
   
   
  
  
  
  1.14      +8 -0      ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetBaseMatchingTask.java
  
  Index: DotnetBaseMatchingTask.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetBaseMatchingTask.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DotnetBaseMatchingTask.java	4 Feb 2005 22:24:10 -0000	1.13
  +++ DotnetBaseMatchingTask.java	11 Apr 2005 08:39:40 -0000	1.14
  @@ -18,6 +18,7 @@
   package org.apache.tools.ant.taskdefs.optional.dotnet;
   
   import org.apache.tools.ant.taskdefs.MatchingTask;
  +import org.apache.tools.ant.taskdefs.condition.Os;
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.DirectoryScanner;
  @@ -47,6 +48,13 @@
       protected File srcDir;
   
       /**
  +     * Are we running on Windows?
  +     *
  +     * @since Ant 1.6.3
  +     */
  +    protected static final boolean isWindows = Os.isFamily("windows");
  +
  +    /**
       * Overridden because we need to be able to set the srcDir.
       */
       public File getSrcDir() {
  
  
  
  1.28      +18 -4     ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java
  
  Index: DotnetCompile.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- DotnetCompile.java	14 Mar 2005 14:58:54 -0000	1.27
  +++ DotnetCompile.java	11 Apr 2005 08:39:40 -0000	1.28
  @@ -219,7 +219,11 @@
       protected String getReferencesParameter() {
           //bail on no references
           if (notEmpty(references)) {
  -            return REFERENCE_OPTION + '\"' + references + '\"';
  +            if (isWindows) {
  +                return REFERENCE_OPTION + '\"' + references + '\"';
  +            } else {
  +                return references;
  +            }
           } else {
               return null;
           }
  @@ -270,7 +274,13 @@
           }
   
           StringBuffer s = new StringBuffer(REFERENCE_OPTION);
  -        s.append('\"').append(refpath).append('\"');
  +        if (isWindows) {
  +            s.append('\"');
  +        }
  +        s.append(refpath);
  +        if (isWindows) {
  +            s.append('\"');
  +        }
           return s.toString();
       }
   
  @@ -903,7 +913,7 @@
               if (isFileManagedBinary(file)) {
                   if (!firstEntry) {
                       referenceList.append(getReferenceDelimiter());
  -                } else {
  +                } else if (isWindows) {
                       referenceList.append('\"');
                   }
                   referenceList.append(file.toString());
  @@ -918,7 +928,11 @@
           // a managed binary
           if (!firstEntry) {
               //add it all to an argument
  -            command.addArgument(referenceList.toString() + '\"');
  +            if (isWindows) {
  +                command.addArgument(referenceList.toString() + '\"');
  +            } else {
  +                command.addArgument(referenceList.toString());
  +            }
           }
           
           return filesOutOfDate;
  
  
  

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


Mime
View raw message