X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FJava%2FSource%2FGenBuild%2Forg%2Ftianocore%2Fbuild%2FFrameworkBuildTask.java;h=84e799d00c63245f1f5fcb8cd628752165e08a9c;hp=3d17befe1973b614b3c8a1af0dd79bc4f8ec3b1a;hb=c340a28e277f524698ff42ce631f277583772b65;hpb=c587fa4b280c7d2439729a8d4f20784e95d1c9cb 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(); } }