\r
import org.tianocore.common.definitions.ToolDefinitions;\r
import org.tianocore.common.exception.EdkException;\r
-import org.tianocore.common.logger.EdkLog;\r
import org.tianocore.build.autogen.AutoGen;\r
import org.tianocore.build.exception.AutoGenException;\r
import org.tianocore.build.exception.GenBuildException;\r
From module build, exception from module surface area invalid.\r
**/\r
public void execute() throws BuildException {\r
+ this.setTaskName("GenBuild");\r
try {\r
processGenBuild();\r
} catch (PcdAutogenException e) {\r
Map<String, XmlObject> doc = GlobalData.getNativeMsa(msaFile);\r
saq = new SurfaceAreaQuery(doc);\r
moduleId = saq.getMsaHeader();\r
+ moduleId.setMsaFile(msaFile);\r
}\r
\r
String[] producedLibraryClasses = saq.getLibraryClasses("ALWAYS_PRODUCED",null);\r
// Whether the module is built before\r
//\r
if (moduleId.isLibrary() == false && GlobalData.hasFpdModuleSA(fpdModuleId) == false) {\r
- EdkLog.log(this, EdkLog.EDK_WARNING, "Warning: " + moduleId + " for " + archList[k] + " was not found in current platform FPD file!\n");\r
+ getProject().log(this, "Warning: " + moduleId + " for " + archList[k] + " was not found in current platform FPD file!\n", Project.MSG_WARN);\r
continue;\r
} else if (GlobalData.isModuleBuilt(fpdModuleId)) {\r
break;\r
// don't do anything if no tools found\r
//\r
if (GlobalData.isCommandSet(targetList[i], toolchainList[j], archList[k]) == false) {\r
- EdkLog.log(this, EdkLog.EDK_WARNING, "Warning: No build issued. No tools were found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n");\r
+ getProject().log(this, "Warning: No build issued. No tools were found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n", Project.MSG_WARN);\r
continue;\r
}\r
\r
//\r
getProject().setProperty("TOOLCHAIN", toolchainList[j]);\r
\r
- EdkLog.log(this, "Build " + moduleId + " start >>>");\r
- EdkLog.log(this, "Target: " + targetList[i] + " Tagname: " + toolchainList[j] + " Arch: " + archList[k]);\r
+ getProject().log(this, "Build " + moduleId + " start >>>", Project.MSG_INFO);\r
+ getProject().log(this, "Target: " + targetList[i] + " Tagname: " + toolchainList[j] + " Arch: " + archList[k], Project.MSG_INFO);\r
saq.push(GlobalData.getDoc(fpdModuleId));\r
\r
//\r
private void prepareSingleModuleBuild() throws EdkException {\r
//\r
// Find out the package which the module belongs to\r
- // TBD: Enhance it!!!!\r
//\r
PackageIdentification packageId = GlobalData.getPackageForModule(moduleId);\r
GlobalData.refreshPackageIdentification(packageId);\r
// then call the exist BaseName_build.xml directly.\r
//\r
if (moduleId.getModuleType().equalsIgnoreCase("USER_DEFINED")) {\r
- EdkLog.log(this, "Call user-defined " + moduleId.getName() + "_build.xml");\r
+ getProject().log(this, "Call user-defined " + moduleId.getName() + "_build.xml", Project.MSG_INFO);\r
\r
String antFilename = getProject().getProperty("MODULE_DIR") + File.separatorChar + moduleId.getName() + "_build.xml";\r
antCall(antFilename, null);\r
// then call the exist BaseName_build.xml directly.\r
//\r
if (moduleId.getModuleType().equalsIgnoreCase("USER_DEFINED")) {\r
- EdkLog.log(this, "Calling user-defined " + moduleId.getName() + "_build.xml");\r
+ getProject().log(this, "Calling user-defined " + moduleId.getName() + "_build.xml", Project.MSG_INFO);\r
\r
String antFilename = getProject().getProperty("MODULE_DIR") + File.separatorChar + moduleId.getName() + "_build.xml";\r
antCall(antFilename, "clean");\r
// then call the exist BaseName_build.xml directly.\r
//\r
if (moduleId.getModuleType().equalsIgnoreCase("USER_DEFINED")) {\r
- EdkLog.log(this, "Calling user-defined " + moduleId.getName() + "_build.xml");\r
+ getProject().log(this, "Calling user-defined " + moduleId.getName() + "_build.xml", Project.MSG_INFO);\r
\r
String antFilename = getProject().getProperty("MODULE_DIR") + File.separatorChar + moduleId.getName() + "_build.xml";\r
antCall(antFilename, "cleanall");\r