summaryrefslogtreecommitdiff
path: root/Tools/Java/Source
diff options
context:
space:
mode:
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>2006-12-08 08:14:10 +0000
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>2006-12-08 08:14:10 +0000
commitc340a28e277f524698ff42ce631f277583772b65 (patch)
tree7d5beff365b375ecadfb28ccd5514eb7b4aaa92e /Tools/Java/Source
parentc587fa4b280c7d2439729a8d4f20784e95d1c9cb (diff)
downloadedk2-platforms-c340a28e277f524698ff42ce631f277583772b65.tar.xz
Fixed EDKT482. Added support for multiple msa files in the same directory.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2079 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java/Source')
-rw-r--r--Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java33
-rw-r--r--Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java6
2 files changed, 23 insertions, 16 deletions
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java b/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java
index 3d17befe19..84e799d00c 100644
--- a/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java
+++ b/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java
@@ -207,11 +207,10 @@ public class FrameworkBuildTask extends Task{
// If find more than one FPD files, report error.
//
File buildFile = null;
- if (msaFiles.size() > 1) {
- throw new BuildException("Found " + msaFiles.size() + " MSA files in current dir. ");
- } else if (msaFiles.size() == 1 && activePlatform == null) {
- throw new BuildException("If trying to build a single module, please set ACTIVE_PLATFORM in file [" + targetFilename + "]. ");
- } else if (msaFiles.size() == 1 && activePlatform != null) {
+ if (msaFiles.size() > 0) {
+ if (activePlatform == null) {
+ throw new BuildException("If trying to build a single module, please set ACTIVE_PLATFORM in file [" + targetFilename + "]. ");
+ }
//
// Build the single module
//
@@ -278,17 +277,21 @@ public class FrameworkBuildTask extends Task{
}
File tmpFile = new File(GlobalData.getWorkspacePath() + File.separatorChar + activePlatform);
EdkLog.log(this, "Using the FPD file [" + tmpFile.getPath() + "] for the active platform. ");
- EdkLog.log(this, "Processing the MSA file [" + buildFile.getPath() + "] ..>> ");
- GenBuildTask genBuildTask = new GenBuildTask();
- genBuildTask.setSingleModuleBuild(true);
- genBuildTask.setType(type);
- getProject().setProperty("PLATFORM_FILE", activePlatform);
- if( !multithread) {
- originalProperties.put("PLATFORM_FILE", activePlatform);
+
+ File[] moduleFiles = msaFiles.toArray(new File[msaFiles.size()]);
+ for (int i = 0; i < moduleFiles.length; ++i) {
+ EdkLog.log(this, "Processing the MSA file [" + moduleFiles[i].getPath() + "] ..>> ");
+ GenBuildTask genBuildTask = new GenBuildTask();
+ genBuildTask.setSingleModuleBuild(true);
+ genBuildTask.setType(type);
+ getProject().setProperty("PLATFORM_FILE", activePlatform);
+ if( !multithread) {
+ originalProperties.put("PLATFORM_FILE", activePlatform);
+ }
+ genBuildTask.setProject(getProject());
+ genBuildTask.setMsaFile(moduleFiles[i]);
+ genBuildTask.perform();
}
- genBuildTask.setProject(getProject());
- genBuildTask.setMsaFile(buildFile);
- genBuildTask.perform();
}
}
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java b/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java
index 389b8f12b1..249ca8328d 100644
--- a/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java
+++ b/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java
@@ -253,6 +253,10 @@ public class GenBuildTask extends Ant {
}
}
+ if (archList.length == 0) {
+ EdkLog.log(this, EdkLog.EDK_WARNING, "Warning: " + moduleId + " was not found in current platform FPD file!\n");
+ }
+
for (int k = 0; k < archList.length; k++) {
getProject().setProperty("ARCH", archList[k]);
@@ -422,7 +426,7 @@ public class GenBuildTask extends Ant {
getProject().setProperty("VERSION", moduleId.getVersion());
getProject().setProperty("MODULE_TYPE", moduleId.getModuleType());
getProject().setProperty("MODULE_DIR", moduleId.getMsaFile().getParent().replaceAll("(\\\\)", "/"));
- getProject().setProperty("MODULE_RELATIVE_DIR", moduleId.getModuleRelativePath().replaceAll("(\\\\)", "/"));
+ getProject().setProperty("MODULE_RELATIVE_DIR", moduleId.getModuleRelativePath().replaceAll("(\\\\)", "/") + File.separatorChar + moduleId.getName());
//
// SUBSYSTEM