import org.apache.tools.ant.Project;\r
import org.tianocore.build.fpd.FpdParserTask;\r
import org.tianocore.build.global.SurfaceAreaQuery;\r
-import org.tianocore.build.global.PropertyManager;\r
import org.tianocore.build.id.FpdModuleIdentification;\r
import org.tianocore.build.id.ModuleIdentification;\r
import org.tianocore.build.id.PackageIdentification;\r
/// Pass: TARGET, TOOLCHAIN, ARCH\r
/// PACKAGE, PACKAGE_GUID, PACKAGE_VERSION\r
///\r
- String[] inheritProperties = {"ARCH", "MODULE_GUID", "MODULE_VERSION", "PLATFORM_FILE", "PACKAGE_GUID", "PACKAGE_VERSION"};\r
+ String[] inheritProperties = {"ARCH", "MODULE_GUID", "MODULE_VERSION", "PACKAGE_GUID", "PACKAGE_VERSION"};\r
\r
///\r
/// The information at the header of <em>build.xml</em>.\r
\r
private String[] includes;\r
\r
- public ModuleBuildFileGenerator(Project project, String ffsKeyword, FpdModuleIdentification fpdModuleId, String[] includes) {\r
+ private SurfaceAreaQuery saq = null;\r
+ \r
+ public ModuleBuildFileGenerator(Project project, String ffsKeyword, FpdModuleIdentification fpdModuleId, String[] includes, SurfaceAreaQuery saq) {\r
this.project = project;\r
this.fpdModuleId = fpdModuleId;\r
this.ffsKeyword = ffsKeyword;\r
this.includes = includes;\r
+ this.saq = saq;\r
}\r
\r
/**\r
//\r
// Parse all sourfiles but files specified in sections\r
//\r
- applyLibraryInstance(document, ele);\r
+ if (!FrameworkBuildTask.multithread) {\r
+ applyLibraryInstance(document, ele);\r
+ }\r
root.appendChild(ele);\r
\r
//\r
@param root Root element for current\r
**/\r
private void applyLibraryInstance(Document document, Node root) {\r
- ModuleIdentification[] libinstances = SurfaceAreaQuery.getLibraryInstance(fpdModuleId.getArch());\r
+ ModuleIdentification[] libinstances = saq.getLibraryInstance(fpdModuleId.getArch());\r
for (int i = 0; i < libinstances.length; i++) {\r
//\r
// Put package file path to module identification\r
//\r
// sourceFiles[][0] is FileType, [][1] is File name relative to Module_Dir\r
//\r
- String[][] sourceFiles = SurfaceAreaQuery.getSourceFiles(fpdModuleId.getArch());\r
+ String[][] sourceFiles = saq.getSourceFiles(fpdModuleId.getArch());\r
\r
FileProcess fileProcess = new FileProcess();\r
fileProcess.init(project, includes, document);\r
for (int i = 0; i < sourceFiles.length; i++) {\r
str += " " + sourceFiles[i][1];\r
}\r
- PropertyManager.setProperty(project, "SOURCE_FILES", str.replaceAll("(\\\\)", "/"));\r
+ project.setProperty("SOURCE_FILES", str.replaceAll("(\\\\)", "/"));\r
}\r
\r
/**\r