]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/build/build.py
BaseTools/GenFds: register MM Modules and MM FV file types.
[mirror_edk2.git] / BaseTools / Source / Python / build / build.py
index bd14e273d299b7aa31c2e3b9e68aec9a70e53c0d..ae8aa2fa38b655860ee69ef3e8f885aebf2a6aad 100644 (file)
@@ -2,7 +2,7 @@
 # build a platform or a module\r
 #\r
 #  Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>\r
-#  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -54,7 +54,7 @@ import Common.GlobalData as GlobalData
 # Version and Copyright\r
 VersionNumber = "0.60" + ' ' + gBUILD_VERSION\r
 __version__ = "%prog Version " + VersionNumber\r
-__copyright__ = "Copyright (c) 2007 - 2016, Intel Corporation  All rights reserved."\r
+__copyright__ = "Copyright (c) 2007 - 2017, Intel Corporation  All rights reserved."\r
 \r
 ## standard targets of build command\r
 gSupportedTarget = ['all', 'genc', 'genmake', 'modules', 'libraries', 'fds', 'clean', 'cleanall', 'cleanlib', 'run']\r
@@ -1736,12 +1736,15 @@ class Build():
                 MaList = []\r
                 for Arch in Wa.ArchList:\r
                     GlobalData.gGlobalDefines['ARCH'] = Arch\r
-                    Ma = ModuleAutoGen(Wa, self.ModuleFile, BuildTarget, ToolChain, Arch, self.PlatformFile)\r
-                    if Ma == None: continue\r
-                    MaList.append(Ma)\r
-                    self.BuildModules.append(Ma)\r
-                    if not Ma.IsBinaryModule:\r
-                        self._Build(self.Target, Ma, BuildModule=True)\r
+                    Pa = PlatformAutoGen(Wa, self.PlatformFile, BuildTarget, ToolChain, Arch)\r
+                    for Module in Pa.Platform.Modules:\r
+                        if self.ModuleFile.Dir == Module.Dir and self.ModuleFile.File == Module.File:\r
+                            Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile)\r
+                            if Ma == None: continue\r
+                            MaList.append(Ma)\r
+                            self.BuildModules.append(Ma)\r
+                            if not Ma.IsBinaryModule:\r
+                                self._Build(self.Target, Ma, BuildModule=True)\r
 \r
                 self.BuildReport.AddPlatformReport(Wa, MaList)\r
                 if MaList == []:\r