Browse Source

make definitions work for Mono

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275078 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
a06d11ce99
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java

+ 6
- 2
src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java View File

@@ -720,19 +720,23 @@ public abstract class DotnetCompile
protected String getDefinitionsParameter() throws BuildException { protected String getDefinitionsParameter() throws BuildException {
StringBuffer defines = new StringBuffer(); StringBuffer defines = new StringBuffer();
Enumeration defEnum = definitionList.elements(); Enumeration defEnum = definitionList.elements();
boolean firstDefinition = true;
while (defEnum.hasMoreElements()) { while (defEnum.hasMoreElements()) {
//loop through all definitions //loop through all definitions
DotnetDefine define = (DotnetDefine) defEnum.nextElement(); DotnetDefine define = (DotnetDefine) defEnum.nextElement();
if (define.isSet(this)) { if (define.isSet(this)) {
//add those that are set, and a delimiter //add those that are set, and a delimiter
if (!firstDefinition) {
defines.append(getDefinitionsDelimiter());
}
defines.append(define.getValue(this)); defines.append(define.getValue(this));
defines.append(getDefinitionsDelimiter());
firstDefinition = false;
} }
} }
if (defines.length() == 0) { if (defines.length() == 0) {
return null; return null;
} else { } else {
return "/D:" + defines;
return "/d:" + defines;
} }
} }




Loading…
Cancel
Save