summaryrefslogtreecommitdiff
path: root/Tools/Java
diff options
context:
space:
mode:
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-06 03:09:32 +0000
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-06 03:09:32 +0000
commit2b0fe8b4a480334e05e00a2bcedb391a2e6adccc (patch)
tree3ce626af22ea0d68fbc166ccf6c046295d33f9a5 /Tools/Java
parentf55618484b12541abd677ba5000a53ce23eb507e (diff)
downloadedk2-platforms-2b0fe8b4a480334e05e00a2bcedb391a2e6adccc.tar.xz
Added code to check that the definitions in target.txt are valid against tools_def.txt
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1898 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java')
-rw-r--r--Tools/Java/Source/GenBuild/org/tianocore/build/global/GlobalData.java21
-rw-r--r--Tools/Java/Source/GenBuild/org/tianocore/build/toolchain/ToolChainConfig.java1
2 files changed, 20 insertions, 2 deletions
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 437858a711..b79e505210 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() {
+ public synchronized static ToolChainInfo getToolChainInfo() throws EdkException {
if (toolChainInfo == null) {
toolChainInfo = toolsDef.getConfigInfo().intersection(toolChainEnvInfo);
if (toolChainPlatformInfo != null) {
@@ -690,6 +690,23 @@ 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 + "");
}
@@ -724,7 +741,7 @@ public class GlobalData {
msaFamilyBuildOption.put(moduleId, toolChainOption);
}
- public static boolean isCommandSet(String target, String toolchain, String arch) {
+ public static boolean isCommandSet(String target, String toolchain, String arch) throws EdkException {
String[] commands = getToolChainInfo().getCommands();
for (int i = 0; i < commands.length; ++i) {
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/toolchain/ToolChainConfig.java b/Tools/Java/Source/GenBuild/org/tianocore/build/toolchain/ToolChainConfig.java
index b12c43662c..f78d49f507 100644
--- a/Tools/Java/Source/GenBuild/org/tianocore/build/toolchain/ToolChainConfig.java
+++ b/Tools/Java/Source/GenBuild/org/tianocore/build/toolchain/ToolChainConfig.java
@@ -83,6 +83,7 @@ public class ToolChainConfig {
info.addTagnames(keySet[ToolChainElement.TOOLCHAIN.value]);
info.addArchs(keySet[ToolChainElement.ARCH.value]);
info.addCommands(keySet[ToolChainElement.TOOLCODE.value]);
+ info.normalize();
}
}