\r
genBuildTask.perform();\r
} catch (BuildException be) {\r
-\r
- EdkLog.log("GenBuild", EdkLog.EDK_ALWAYS, moduleId + " with Arch " + arch +" build error. \n" + be.getMessage());\r
+ \r
+ EdkLog.log("GenBuild", EdkLog.EDK_ALWAYS, fpdModuleId + " build error. \n" + be.getMessage());\r
\r
if (FpdParserForThread.errorModule == null) {\r
FpdParserForThread.errorModule = fpdModuleId;\r
public void parseFpdFile(File fpdFile) throws BuildException, EdkException {\r
this.fpdFile = fpdFile;\r
parseFpdFile();\r
+ \r
+ //\r
+ // Call Platform_build.xml prebuild firstly in stand-alone build\r
+ // Prepare BUILD_DIR\r
+ //\r
+ isUnified = OutputManager.getInstance().prepareBuildDir(getProject());\r
+\r
+ String buildDir = getProject().getProperty("BUILD_DIR");\r
+ //\r
+ // For every Target and ToolChain\r
+ //\r
+ String[] targetList = GlobalData.getToolChainInfo().getTargets();\r
+ for (int i = 0; i < targetList.length; i++) {\r
+ String[] toolchainList = GlobalData.getToolChainInfo().getTagnames();\r
+ for(int j = 0; j < toolchainList.length; j++) {\r
+ //\r
+ // Prepare FV_DIR\r
+ //\r
+ String ffsCommonDir = buildDir + File.separatorChar\r
+ + targetList[i] + "_"\r
+ + toolchainList[j];\r
+ File fvDir = new File(ffsCommonDir + File.separatorChar + "FV");\r
+ fvDir.mkdirs();\r
+ }\r
+ }\r
+\r
+ String platformBuildFile = buildDir + File.separatorChar + platformId.getName() + "_build.xml";\r
+ PlatformBuildFileGenerator fileGenerator = new PlatformBuildFileGenerator(getProject(), outfiles, fvs, isUnified, saq, platformBuildFile);\r
+ fileGenerator.genBuildFile();\r
+ \r
+ Ant ant = new Ant();\r
+ ant.setProject(getProject());\r
+ ant.setAntfile(platformBuildFile);\r
+ ant.setTarget("prebuild");\r
+ ant.setInheritAll(true);\r
+ ant.init();\r
+ ant.execute();\r
}\r
\r
/**\r