ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java
Date Fri, 08 Aug 2003 00:11:05 GMT
stevel      2003/08/07 17:11:05

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/dotnet
                        DotnetCompile.java
  Log:
  Lets try this as a fix: A new option to turn standardlib on
  or off that overrides the defaultreferences switch
  
  Revision  Changes    Path
  1.13      +31 -1     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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DotnetCompile.java	6 Aug 2003 09:53:23 -0000	1.12
  +++ DotnetCompile.java	8 Aug 2003 00:11:05 -0000	1.13
  @@ -160,6 +160,8 @@
   
       protected String executable;
   
  +    protected Boolean standardLib;
  +
       /**
        *  Fix .NET reference inclusion. .NET is really dumb in how it handles
        *  inclusion. You have to list every 'assembly' -read DLL that is imported.
  @@ -392,7 +394,11 @@
        *@return    The Parameter to CSC
        */
       protected String getIncludeDefaultReferencesParameter() {
  -        return "/nostdlib" + (includeDefaultReferences ? "-" : "+");
  +        if(standardLib==null) {
  +            return "/nostdlib" + (includeDefaultReferences ? "-" : "+");
  +        } else {
  +            return null;
  +        }
       }
   
   
  @@ -817,6 +823,29 @@
       }
   
       /**
  +     * turn standard lib support on or off.
  +     * Setting this in either direction overrides anything set in defaultreferences.
  +     * @param standardLib
  +     */
  +    public void setStandardLib(Boolean standardLib) {
  +        this.standardLib = standardLib;
  +    }
  +
  +
  +    /**
  +     *  get the include default references flag or null for no argument needed
  +     *
  +     *@return    The Parameter to CSC
  +     */
  +    protected String getStandardLibParameter() {
  +        if (standardLib != null) {
  +            return "/nostdlib" + (standardLib.booleanValue() ? "-" : "+");
  +        } else {
  +            return null;
  +        }
  +    }
  +
  +    /**
        *  test for a string containing something useful
        *
        *@param  s  string in
  @@ -909,6 +938,7 @@
           command.addArgument(getAdditionalModulesParameter());
           command.addArgument(getDebugParameter());
           command.addArgument(getDefaultReferenceParameter());
  +        command.addArgument(getStandardLibParameter());
           command.addArgument(getDefinitionsParameter());
           command.addArgument(getExtraOptionsParameter());
           command.addArgument(getMainClassParameter());
  
  
  

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


Mime
View raw message