diff options
author | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-08 10:02:19 +0000 |
---|---|---|
committer | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-08 10:02:19 +0000 |
commit | c773bec060fad36cc7b65fba89f8f8c388657424 (patch) | |
tree | 7b7bd61e4a886d6c0b863ae189fd3e2d2a1823c9 /Tools | |
parent | dd23984c3d07a17158661224d906558377a40b87 (diff) | |
download | edk2-platforms-c773bec060fad36cc7b65fba89f8f8c388657424.tar.xz |
Changed the code to read the correct configuration name in target.txt file;
Fixed an issue which caused building platform with un-defined tools.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@833 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
4 files changed, 38 insertions, 22 deletions
diff --git a/Tools/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java b/Tools/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java index f91002ace1..88e1a20e5e 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java +++ b/Tools/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java @@ -267,7 +267,7 @@ public class FrameworkBuildTask extends Task{ else {
envToolChainInfo.addTargets(str);
}
- str = getValue("TAGNAME", targetFileInfo);
+ str = getValue("TOOL_CHAIN_TAG", targetFileInfo);
if (str == null || str.trim().equals("")) {
envToolChainInfo.addTagnames("*");
}
@@ -283,7 +283,7 @@ public class FrameworkBuildTask extends Task{ }
GlobalData.setToolChainEnvInfo(envToolChainInfo);
- str = getValue("TOOLS_DEFINITION_FILE", targetFileInfo);
+ str = getValue("TOOL_CHAIN_CONF", targetFileInfo);
if (str != null) {
toolsDefFilename = str;
}
diff --git a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java index 1299e11059..6dd0a4fff0 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java +++ b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java @@ -243,6 +243,15 @@ public class GenBuildTask extends Ant { String[] toolchainList = GlobalData.getToolChainInfo().getTagnames();
for(int j = 0; j < toolchainList.length; j ++){
//
+ // check if any tool is defined for current target + toolchain + arch
+ // don't do anything if no tools found
+ //
+ if (GlobalData.isCommandSet(targetList[i], toolchainList[j], archList[k]) == false) {
+ System.out.println("!!!Warning: No build issued. No tools found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n");
+ continue;
+ }
+
+ //
// Prepare for toolchain related common properties
// TOOLCHAIN
//
diff --git a/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java b/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java index f3f0a048d9..75c637ffe1 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java +++ b/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java @@ -689,6 +689,18 @@ public class GlobalData { moduleToolChainFamilyOption.put(fpdModuleId, toolChainOption);
}
+ public static boolean isCommandSet(String target, String toolchain, String arch) {
+ String[] commands = getToolChainInfo().getCommands();
+
+ for (int i = 0; i < commands.length; ++i) {
+ if (toolsDef.getConfig().get(new String[] {target, toolchain, arch, commands[i], ToolChainAttribute.NAME.toString()}) != null) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
public static String getCommandSetting(String[] commandDescription, FpdModuleIdentification fpdModuleId) throws EdkException {
ToolChainKey toolChainKey = new ToolChainKey(commandDescription);
ToolChainMap toolChainConfig = toolsDef.getConfig();
diff --git a/Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainMap.java b/Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainMap.java index 39034fd4b7..51cbf852ad 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainMap.java +++ b/Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainMap.java @@ -31,39 +31,38 @@ public class ToolChainMap { private Map<ToolChainKey, String> map = null;
public ToolChainMap() {
- //this.map = new TreeMap<ToolChainKey, String>();
this.map = new HashMap<ToolChainKey, String>();
}
- public String put(String key, String delimiter, String value)throws EdkException {
+ public String put(String key, String delimiter, String value) {
ToolChainKey toolChainKey;
try {
toolChainKey = new ToolChainKey(key, delimiter);
} catch (Exception e) {
- throw new EdkException(e.getMessage());
+ return null;
}
return (String)map.put(toolChainKey, value);
}
- public String put(String key, String value) throws EdkException {
+ public String put(String key, String value) {
ToolChainKey toolChainKey;
try {
toolChainKey = new ToolChainKey(key);
} catch (Exception e) {
- throw new EdkException(e.getMessage());
+ return null;
}
return (String)map.put(toolChainKey, value);
}
- public String put(String[] key, String value) throws EdkException {
+ public String put(String[] key, String value) {
ToolChainKey toolChainKey;
try {
toolChainKey = new ToolChainKey(key);
} catch (Exception e) {
- throw new EdkException(e.getMessage());
+ return null;
}
return (String)map.put(toolChainKey, value);
}
@@ -72,40 +71,40 @@ public class ToolChainMap { return (String)map.put(key, value);
}
- public String get(String key) throws EdkException {
+ public String get(String key) {
ToolChainKey toolChainKey;
try {
toolChainKey = new ToolChainKey(key);
} catch (Exception e) {
- throw new EdkException(e.getMessage());
+ return null;
}
return get(toolChainKey);
}
- public String get(String key, String delimiter) throws EdkException {
+ public String get(String key, String delimiter) {
ToolChainKey toolChainKey;
try {
toolChainKey = new ToolChainKey(key, delimiter);
} catch (Exception e) {
- throw new EdkException(e.getMessage());
+ return null;
}
return get(toolChainKey);
}
- public String get(String[] key) throws EdkException {
+ public String get(String[] key) {
ToolChainKey toolChainKey;
try {
toolChainKey = new ToolChainKey(key);
} catch (Exception e) {
- throw new EdkException(e.getMessage());
+ return null;
}
return get(toolChainKey);
}
- public String get(ToolChainKey key) throws EdkException {
+ public String get(ToolChainKey key) {
String result = map.get(key);
if (result != null || map.containsKey(key)) {
return result;
@@ -116,7 +115,7 @@ public class ToolChainMap { try {
tmpKey = new ToolChainKey(keySet);
} catch (Exception e) {
- throw new EdkException(e.getMessage());
+ return null;
}
int level = matchLevel;
@@ -134,7 +133,7 @@ public class ToolChainMap { continue;
}
} catch (Exception e) {
- throw new EdkException(e.getMessage());
+ return null;
}
result = map.get(tmpKey);
@@ -157,9 +156,5 @@ public class ToolChainMap { public Set<ToolChainKey> keySet() {
return (Set<ToolChainKey>)map.keySet();
}
-
-// public String toString() {
-// return map.toString();
-// }
}
|