summaryrefslogtreecommitdiff
path: root/Tools/Source/GenBuild/org/tianocore/build/fpd
diff options
context:
space:
mode:
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-15 08:36:45 +0000
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-15 08:36:45 +0000
commit825168879302d78f47b0f1dea6009aecae0b62de (patch)
tree89164b009132ce269e8890360229377028a811a3 /Tools/Source/GenBuild/org/tianocore/build/fpd
parent5a6cd58892309c5d1984038be868f2aaa01df3bf (diff)
downloadedk2-825168879302d78f47b0f1dea6009aecae0b62de.zip
edk2-825168879302d78f47b0f1dea6009aecae0b62de.tar.gz
edk2-825168879302d78f47b0f1dea6009aecae0b62de.tar.bz2
Adjust some code format and clear some unused codes.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1273 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Source/GenBuild/org/tianocore/build/fpd')
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java25
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java5
2 files changed, 14 insertions, 16 deletions
diff --git a/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java b/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
index 80682b2..6130ee2 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
@@ -82,9 +82,6 @@ public class FpdParserTask extends Task {
private PlatformIdentification platformId;
- ///
- ///
- ///
private String type;
///
@@ -127,7 +124,10 @@ public class FpdParserTask extends Task {
Surface area is not valid.
**/
public void execute() throws BuildException {
- // Remove !!
+ //
+ // If fpdFile is not specified,
+ // then try to get FPD file by platformName
+ //
if ( fpdFile == null) {
if (platformName == null) {
throw new BuildException("FpdParserTask parameter error. Please specify either the platform name or FPD file!");
@@ -150,9 +150,9 @@ public class FpdParserTask extends Task {
// For every Target and ToolChain
//
String[] targetList = GlobalData.getToolChainInfo().getTargets();
- for (int i = 0; i < targetList.length; i++){
+ for (int i = 0; i < targetList.length; i++) {
String[] toolchainList = GlobalData.getToolChainInfo().getTagnames();
- for(int j = 0; j < toolchainList.length; j++){
+ for(int j = 0; j < toolchainList.length; j++) {
//
// Prepare FV_DIR
//
@@ -187,8 +187,6 @@ public class FpdParserTask extends Task {
ant.setInheritAll(true);
ant.init();
ant.execute();
-
-// GlobalData.log.info("Fpd build end. ");
}
/**
@@ -409,7 +407,6 @@ public class FpdParserTask extends Task {
//
SurfaceAreaQuery.push(GlobalData.getDoc(fpdModuleId));
String fvBinding = SurfaceAreaQuery.getModuleFvBindingKeyword();
- SurfaceAreaQuery.pop();
fpdModuleId.setFvBinding(fvBinding);
updateFvs(fvBinding, fpdModuleId);
@@ -418,9 +415,9 @@ public class FpdParserTask extends Task {
// Prepare for out put file name
//
ModuleIdentification moduleId = fpdModuleId.getModule();
- SurfaceAreaQuery.push(GlobalData.getDoc(fpdModuleId));
+
String baseName = SurfaceAreaQuery.getModuleOutputFileBasename();
- SurfaceAreaQuery.pop();
+
if (baseName == null) {
baseName = moduleId.getName();
}
@@ -431,7 +428,6 @@ public class FpdParserTask extends Task {
//
// parse module build options, if any
//
- SurfaceAreaQuery.push(GlobalData.getDoc(fpdModuleId));
GlobalData.addModuleToolChainOption(fpdModuleId, parseModuleBuildOptions(false));
GlobalData.addModuleToolChainFamilyOption(fpdModuleId, parseModuleBuildOptions(true));
SurfaceAreaQuery.pop();
@@ -496,8 +492,7 @@ public class FpdParserTask extends Task {
if (fvs.containsKey(fvNameArray[i])) {
Set<FpdModuleIdentification> set = fvs.get(fvNameArray[i]);
set.add(fpdModuleId);
- }
- else {
+ } else {
Set<FpdModuleIdentification> set = new LinkedHashSet<FpdModuleIdentification>();
set.add(fpdModuleId);
fvs.put(fvNameArray[i], set);
@@ -573,6 +568,4 @@ public class FpdParserTask extends Task {
public void setType(String type) {
this.type = type;
}
-
-
}
diff --git a/Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java b/Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java
index e6a1002..a20f17b 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java
@@ -39,6 +39,11 @@ import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+/**
+ class PlatformBuildFileGenerator is used to generate ${PLATFORM}_build.xml file.
+
+ @since GenBuild 1.0
+**/
public class PlatformBuildFileGenerator {
private String platformName;