def GenFdsCommand(self):\r
return self.Workspace.GenFdsCommand\r
\r
- ## Create makefile for the platform and mdoules in it\r
+ ## Create makefile for the platform and modules in it\r
#\r
# @param CreateModuleMakeFile Flag indicating if the makefile for\r
# modules will be created as well\r
#\r
def CreateMakeFile(self, CreateModuleMakeFile=False, FfsCommand = {}):\r
if CreateModuleMakeFile:\r
- for ModuleFile in self.Platform.Modules:\r
- Ma = ModuleAutoGen(self.Workspace, ModuleFile, self.BuildTarget,\r
- self.ToolChain, self.Arch, self.MetaFile)\r
- if (ModuleFile.File, self.Arch) in FfsCommand:\r
- Ma.CreateMakeFile(True, FfsCommand[ModuleFile.File, self.Arch])\r
+ for Ma in self._MaList:\r
+ key = (Ma.MetaFile.File, self.Arch)\r
+ if key in FfsCommand:\r
+ Ma.CreateMakeFile(True, FfsCommand[key])\r
else:\r
Ma.CreateMakeFile(True)\r
- #Ma.CreateAsBuiltInf()\r
\r
# no need to create makefile for the platform more than once\r
if self.IsMakeFileCreated:\r
for InfName in self._AsBuildInfList:\r
InfName = mws.join(self.WorkspaceDir, InfName)\r
FdfModuleList.append(os.path.normpath(InfName))\r
- for F in self.Platform.Modules.keys():\r
- M = ModuleAutoGen(self.Workspace, F, self.BuildTarget, self.ToolChain, self.Arch, self.MetaFile)\r
- #GuidValue.update(M.Guids)\r
-\r
- self.Platform.Modules[F].M = M\r
-\r
+ for M in self._MaList:\r
+# F is the Module for which M is the module autogen\r
for PcdFromModule in M.ModulePcdList + M.LibraryPcdList:\r
# make sure that the "VOID*" kind of datum has MaxDatumSize set\r
if PcdFromModule.DatumType == TAB_VOID and not PcdFromModule.MaxDatumSize:\r
- NoDatumTypePcdList.add("%s.%s [%s]" % (PcdFromModule.TokenSpaceGuidCName, PcdFromModule.TokenCName, F))\r
+ NoDatumTypePcdList.add("%s.%s [%s]" % (PcdFromModule.TokenSpaceGuidCName, PcdFromModule.TokenCName, M.MetaFile))\r
\r
# Check the PCD from Binary INF or Source INF\r
if M.IsBinaryModule == True:\r
PcdFromModule.IsFromDsc = (PcdFromModule.TokenCName, PcdFromModule.TokenSpaceGuidCName) in self.Platform.Pcds\r
\r
if PcdFromModule.Type in PCD_DYNAMIC_TYPE_SET or PcdFromModule.Type in PCD_DYNAMIC_EX_TYPE_SET:\r
- if F.Path not in FdfModuleList:\r
+ if M.MetaFile.Path not in FdfModuleList:\r
# If one of the Source built modules listed in the DSC is not listed\r
# in FDF modules, and the INF lists a PCD can only use the PcdsDynamic\r
# access method (it is only listed in the DEC file that declares the\r
TokenNumber += 1\r
return RetVal\r
\r
+ @cached_property\r
+ def _MaList(self):\r
+ for ModuleFile in self.Platform.Modules:\r
+ Ma = ModuleAutoGen(\r
+ self.Workspace,\r
+ ModuleFile,\r
+ self.BuildTarget,\r
+ self.ToolChain,\r
+ self.Arch,\r
+ self.MetaFile\r
+ )\r
+ self.Platform.Modules[ModuleFile].M = Ma\r
+ return [x.M for x in self.Platform.Modules.values()]\r
+\r
## Summarize ModuleAutoGen objects of all modules to be built for this platform\r
@cached_property\r
def ModuleAutoGenList(self):\r
RetVal = []\r
- for ModuleFile in self.Platform.Modules:\r
- Ma = ModuleAutoGen(\r
- self.Workspace,\r
- ModuleFile,\r
- self.BuildTarget,\r
- self.ToolChain,\r
- self.Arch,\r
- self.MetaFile\r
- )\r
+ for Ma in self._MaList:\r
if Ma not in RetVal:\r
RetVal.append(Ma)\r
return RetVal\r
@cached_property\r
def LibraryAutoGenList(self):\r
RetVal = []\r
- for ModuleFile in self.Platform.Modules:\r
- Ma = ModuleAutoGen(\r
- self.Workspace,\r
- ModuleFile,\r
- self.BuildTarget,\r
- self.ToolChain,\r
- self.Arch,\r
- self.MetaFile\r
- )\r
+ for Ma in self._MaList:\r
for La in Ma.LibraryAutoGenList:\r
if La not in RetVal:\r
RetVal.append(La)\r