import java.util.Map;\r
import java.util.Set;\r
\r
+import org.apache.tools.ant.Project;\r
import org.apache.xmlbeans.XmlException;\r
import org.apache.xmlbeans.XmlObject;\r
import org.apache.xmlbeans.XmlOptions;\r
@throws BuildException\r
Framework Dababase or SPD or MSA file is not valid\r
**/\r
- public synchronized static void initInfo(String workspaceDatabaseFile, String workspaceDir, String toolsDefFilename ) throws EdkException {\r
+ public synchronized static void initInfo(Project prj, String workspaceDatabaseFile, String workspaceDir, String toolsDefFilename ) throws EdkException {\r
//\r
// ensure this method will be revoked only once\r
//\r
//\r
File toolsDefFile = new File(workspaceDir + File.separatorChar + toolsDefFilename);\r
EdkLog.log("Init", EdkLog.EDK_ALWAYS, "Using tool definition file [" + toolsDefFile.getPath() + "].");\r
- toolsDef = new ToolChainConfig(toolsDefFile);\r
+ toolsDef = new ToolChainConfig(prj, toolsDefFile);\r
\r
//\r
// Parse Framework Database\r
PackageIdentification packageId = null;\r
Iterator iter = packageList.iterator();\r
while (iter.hasNext()) {\r
- packageId = (PackageIdentification)iter.next();\r
- moduleId.setPackage(packageId);\r
- Spd spd = spdTable.get(packageId);\r
+ PackageIdentification pid = (PackageIdentification)iter.next();\r
+ moduleId.setPackage(pid);\r
+ Spd spd = spdTable.get(pid);\r
File tempMsaFile = null;\r
if ((tempMsaFile = spd.getModuleFile(moduleId)) != null ) {\r
if (tempMsaFile.getParent().equalsIgnoreCase(moduleId.getMsaFile().getParent())) {\r
+ packageId = pid;\r
break ;\r
}\r
tempMsaFile = null;\r
}\r
}\r
if (packageId == null){\r
- throw new EdkException("Can't find Module [" + moduleId.getName() + "] in any SPD package!");\r
+ throw new EdkException("Can't find Module [" + moduleId.getName() + "] in any package!");\r
} else {\r
return packageId;\r
}\r
return moduleId;\r
}\r
}\r
- throw new EdkException("Can't find module GUID value " + moduleId.toGuidString() + " in " + packageId + " under the current workspace!");\r
+ throw new EdkException("Can't find " + moduleId + " under the current workspace!");\r
}\r
\r
public synchronized static Set<PackageIdentification> getPackageList(){\r
}\r
toolChainInfo.addCommands(toolsDef.getConfigInfo().getCommands());\r
toolChainInfo.normalize();\r
+\r
EdkLog.log("Init", EdkLog.EDK_ALWAYS, "Current build tool chain information summary: ");\r
EdkLog.log("Init", EdkLog.EDK_ALWAYS, toolChainInfo + "");\r
}\r
msaFamilyBuildOption.put(moduleId, toolChainOption);\r
}\r
\r
- public static boolean isCommandSet(String target, String toolchain, String arch) {\r
+ public static boolean isCommandSet(String target, String toolchain, String arch) throws EdkException {\r
String[] commands = getToolChainInfo().getCommands();\r
\r
for (int i = 0; i < commands.length; ++i) {\r