|
|
@@ -75,81 +75,57 @@ import java.io.File; |
|
|
|
/** |
|
|
|
* Compiles C# source into executables or modules. |
|
|
|
* |
|
|
|
* The task will only work on win2K until other platforms support |
|
|
|
* csc.exe or an equivalent. CSC.exe must be on the execute path too. <p> |
|
|
|
* |
|
|
|
* All parameters are optional: <csc/> should suffice to produce a debug |
|
|
|
* build of all *.cs files. References to external files do require explicit |
|
|
|
* enumeration, so are one of the first attributes to consider adding. <p> |
|
|
|
* |
|
|
|
* csc.exe must be on the execute path, unless another executable |
|
|
|
* or the full path to that executable is specified in the <tt>executable</tt> |
|
|
|
* parameter |
|
|
|
* <p> |
|
|
|
* All parameters are optional: <csc/> should suffice to produce a debug |
|
|
|
* build of all *.cs files. However, naming an <tt>destFile</tt>stops the |
|
|
|
* csc compiler from choosing an output name from random, and |
|
|
|
* allows the dependency checker to determine if the file is out of date. |
|
|
|
* <p> |
|
|
|
* The task is a directory based task, so attributes like <b>includes="*.cs" |
|
|
|
* </b> and <b>excludes="broken.cs"</b> can be used to control the files pulled |
|
|
|
* in. By default, all *.cs files from the project folder down are included in |
|
|
|
* the command. When this happens the output file -if not specified- is taken |
|
|
|
* as the first file in the list, which may be somewhat hard to control. |
|
|
|
* Specifying the output file with <b>'outfile'</b> seems prudent. <p> |
|
|
|
* |
|
|
|
* <p> |
|
|
|
* |
|
|
|
* TODO |
|
|
|
* <ol> |
|
|
|
* <li> is incremental build still broken in beta-1? |
|
|
|
* <li> is Win32Icon broken? |
|
|
|
* <li> all the missing options |
|
|
|
* </ol> |
|
|
|
* <p> |
|
|
|
* |
|
|
|
* History |
|
|
|
* <Table> |
|
|
|
* |
|
|
|
* <tr> |
|
|
|
* |
|
|
|
* <td> |
|
|
|
* 0.3 |
|
|
|
* </td> |
|
|
|
* |
|
|
|
* <td> |
|
|
|
* Beta 1 edition |
|
|
|
* </td> |
|
|
|
* |
|
|
|
* <td> |
|
|
|
* To avoid having to remember which assemblies to include, the task |
|
|
|
* automatically refers to the main dotnet libraries in Beta1. |
|
|
|
* </tr> |
|
|
|
* |
|
|
|
* <tr> |
|
|
|
* |
|
|
|
* <td> |
|
|
|
* 0.2 |
|
|
|
* </td> |
|
|
|
* |
|
|
|
* <td> |
|
|
|
* Slightly different |
|
|
|
* </td> |
|
|
|
* |
|
|
|
* <td> |
|
|
|
* Split command execution to a separate class; |
|
|
|
* </tr> |
|
|
|
* |
|
|
|
* <tr> |
|
|
|
* Specifying the output file with <tt>destFile</tt> seems prudent. <p> |
|
|
|
* |
|
|
|
* <td> |
|
|
|
* 0.1 |
|
|
|
* </td> |
|
|
|
* <p> |
|
|
|
* For more complex source trees, nested <tt>src</tt> elemements can be |
|
|
|
* supplied. When such an element is present, the implicit fileset is ignored. |
|
|
|
* This makes sense, when you think about it :) |
|
|
|
* <p> |
|
|
|
* |
|
|
|
* <td> |
|
|
|
* "I can't believe it's so rudimentary" |
|
|
|
* </td> |
|
|
|
* References to external files can be made through the references attribute, |
|
|
|
* or (since Ant1.6), via nested <reference> filesets. With the latter, |
|
|
|
* the timestamps of the references are also used in the dependency |
|
|
|
* checking algorithm. |
|
|
|
* <p> |
|
|
|
* |
|
|
|
* <td> |
|
|
|
* First pass; minimal builds only support; |
|
|
|
* </tr> |
|
|
|
* Example |
|
|
|
* |
|
|
|
* </table> |
|
|
|
* <pre><csc |
|
|
|
* optimize="true" |
|
|
|
* debug="false" |
|
|
|
* docFile="documentation.xml" |
|
|
|
* warnLevel="4" |
|
|
|
* unsafe="false" |
|
|
|
* targetType="exe" |
|
|
|
* incremental="false" |
|
|
|
* mainClass = "MainApp" |
|
|
|
* destFile="NetApp.exe" |
|
|
|
* > |
|
|
|
* <src dir="src" includes="*.cs" /> |
|
|
|
* <reference file="${testCSC.dll}" /> |
|
|
|
* <define name="RELEASE" /> |
|
|
|
* <define name="DEBUG" if="debug.property"/> |
|
|
|
* <define name="def3" unless="def3.property"/> |
|
|
|
* </csc> |
|
|
|
* </pre> |
|
|
|
* |
|
|
|
* |
|
|
|
* @author Steve Loughran steve_l@iseran.com |
|
|
|
* @version 0.5 |
|
|
|
* @author Steve Loughran |
|
|
|
* @ant.task name="csc" category="dotnet" |
|
|
|
* @since Ant 1.3 |
|
|
|
*/ |
|
|
|