Browse Source

good thing nobody was using these, cos I broke them.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272385 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 23 years ago
parent
commit
cef89916a4
3 changed files with 22 additions and 9 deletions
  1. +12
    -5
      src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
  3. +9
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java

+ 12
- 5
src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java View File

@@ -69,9 +69,9 @@ package org.apache.tools.ant.taskdefs.optional.dotnet;
// ====================================================================

import java.io.File;

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.types.Path;

@@ -746,9 +746,9 @@ public class CSharp
*@exception BuildException if target is not one of
* exe|library|module|winexe
*/
public void setTargetType(String targetType)
public void setTargetType(String ttype)
throws BuildException {
targetType = targetType.toLowerCase();
targetType = ttype.toLowerCase();
if (targetType.equals("exe") || targetType.equals("library") ||
targetType.equals("module") || targetType.equals("winexe")) {
targetType = targetType;
@@ -1006,7 +1006,7 @@ public class CSharp
*/
protected String getFileAlignParameter() {
if (fileAlign != 0) {
return "/filealing:" + fileAlign;
return "/filealign:" + fileAlign;
} else {
return null;
}
@@ -1068,6 +1068,7 @@ public class CSharp
if (srcDir == null) {
srcDir = project.resolveFile(".");
}
log("CSC working from source directory "+srcDir,Project.MSG_VERBOSE);
validate();

NetCommand command = new NetCommand(this, "CSC", csc_exe_name);
@@ -1114,11 +1115,17 @@ public class CSharp
//add to the command
for (int i = 0; i < dependencies.length; i++) {
File targetFile = new File(base,dependencies[i]);
log(targetFile.toString(),Project.MSG_VERBOSE);
command.addArgument(targetFile.toString());
if(targetFile.lastModified()>outputTimestamp) {
filesOutOfDate++;
log("Source file "+targetFile.toString()+" is out of date");
log("Source file "+targetFile.toString()+" is out of date",
Project.MSG_VERBOSE);
} else {
log("Source file "+targetFile.toString()+" is up to date",
Project.MSG_VERBOSE);
}
}

//now run the command of exe + settings + files


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java View File

@@ -226,7 +226,7 @@ public class Ilasm

public void setTargetType(String targetType)
throws BuildException {
targetType = targetType.toLowerCase();
this.targetType = targetType.toLowerCase();
if (targetType.equals("exe") || targetType.equals("library")) {
targetType = targetType;
} else {


+ 9
- 3
src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java View File

@@ -132,9 +132,9 @@ public class NetCommand {
*/

public NetCommand(Task owner, String title, String program) {
owner = owner;
title = title;
program = program;
this.owner = owner;
this.title = title;
this.program = program;
commandLine = new Commandline();
commandLine.setExecutable(program);
prepareExecutor();
@@ -215,6 +215,12 @@ public class NetCommand {
*/
protected void prepareExecutor() {
// default directory to the project's base directory
if(owner==null) {
throw new RuntimeException("no owner");
}
if(owner.getProject()==null) {
throw new RuntimeException("Owner has no project");
}
File dir = owner.getProject().getBaseDir();
ExecuteStreamHandler handler = new LogStreamHandler(owner,
Project.MSG_INFO, Project.MSG_WARN);


Loading…
Cancel
Save