summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-06 03:55:24 +0000
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-06 03:55:24 +0000
commit05b52e966543caf1ef30ed0513c8b62173db0fa4 (patch)
tree419193c665149ccde21c8bb1a31ca03867177399 /Tools
parent2b0fe8b4a480334e05e00a2bcedb391a2e6adccc (diff)
downloadedk2-platforms-05b52e966543caf1ef30ed0513c8b62173db0fa4.tar.xz
Fixed the build error.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1899 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
-rw-r--r--Tools/Java/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java27
-rw-r--r--Tools/Java/Source/GenBuild/org/tianocore/build/global/GlobalData.java18
2 files changed, 28 insertions, 17 deletions
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java b/Tools/Java/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
index 28379796f4..7d86c64a2d 100644
--- a/Tools/Java/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
+++ b/Tools/Java/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
@@ -49,6 +49,7 @@ import org.tianocore.build.id.PlatformIdentification;
import org.tianocore.build.pcd.action.PlatformPcdPreprocessActionForBuilding;
import org.tianocore.build.toolchain.ToolChainElement;
import org.tianocore.build.toolchain.ToolChainMap;
+import org.tianocore.build.toolchain.ToolChainInfo;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -447,6 +448,11 @@ public class FpdParserTask extends Task {
parseToolChainFamilyOptions();
parseToolChainOptions();
+ //
+ // check if the tool chain is valid or not
+ //
+ checkToolChain();
+
saq.push(map);
//
@@ -768,4 +774,25 @@ public class FpdParserTask extends Task {
}
}
}
+
+
+ private void checkToolChain() throws EdkException {
+ ToolChainInfo toolChainInfo = GlobalData.getToolChainInfo();
+
+ if (toolChainInfo.getTargets().length == 0) {
+ throw new EdkException("No valid target specified! Please check your TARGET definition in Tools/Conf/target.txt.");
+ }
+
+ if (toolChainInfo.getTagnames().length == 0) {
+ throw new EdkException("No valid tool chain specified! Please check your TOOL_CHAIN_TAG definition in Tools/Conf/target.txt.");
+ }
+
+ if (toolChainInfo.getArchs().length == 0) {
+ throw new EdkException("No valid ARCH specified! Please check your TARGET_ARCH definition in Tools/Conf/target.txt.");
+ }
+
+ if (toolChainInfo.getCommands().length == 0) {
+ throw new EdkException("No valid COMMAND specified! Please check your TARGET definition in Tools/Conf/tools_def.txt.");
+ }
+ }
}
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/global/GlobalData.java b/Tools/Java/Source/GenBuild/org/tianocore/build/global/GlobalData.java
index b79e505210..96558876e4 100644
--- a/Tools/Java/Source/GenBuild/org/tianocore/build/global/GlobalData.java
+++ b/Tools/Java/Source/GenBuild/org/tianocore/build/global/GlobalData.java
@@ -682,7 +682,7 @@ public class GlobalData {
///
/// Tool Chain Related, try to refine and put some logic process to ToolChainFactory
///
- public synchronized static ToolChainInfo getToolChainInfo() throws EdkException {
+ public synchronized static ToolChainInfo getToolChainInfo() {
if (toolChainInfo == null) {
toolChainInfo = toolsDef.getConfigInfo().intersection(toolChainEnvInfo);
if (toolChainPlatformInfo != null) {
@@ -691,22 +691,6 @@ public class GlobalData {
toolChainInfo.addCommands(toolsDef.getConfigInfo().getCommands());
toolChainInfo.normalize();
- if (toolChainInfo.getTargets().length == 0) {
- throw new EdkException("No valid target specified! Please check your TARGET definition in Tools/Conf/target.txt.");
- }
-
- if (toolChainInfo.getTagnames().length == 0) {
- throw new EdkException("No valid tool chain specified! Please check your TOOL_CHAIN_TAG definition in Tools/Conf/target.txt.");
- }
-
- if (toolChainInfo.getArchs().length == 0) {
- throw new EdkException("No valid ARCH specified! Please check your TARGET_ARCH definition in Tools/Conf/target.txt.");
- }
-
- if (toolChainInfo.getCommands().length == 0) {
- throw new EdkException("No valid COMMAND specified! Please check your TARGET definition in Tools/Conf/tools_def.txt.");
- }
-
EdkLog.log("Init", EdkLog.EDK_ALWAYS, "Current build tool chain information summary: ");
EdkLog.log("Init", EdkLog.EDK_ALWAYS, toolChainInfo + "");
}