def _GenSources(self): Logger.Debug(2, "Generate %s ..." % DT.TAB_SOURCES) # # Get all SourceFiles # SourceObj = self.Parser.InfSourcesSection.Sources DataList = SourceObj.keys() # # Go through each arch # SourceList = [] for Key in DataList: SourceData = SourceObj[Key] for Item in SourceData: SourceFile = Item.GetSourceFileName() Family = Item.GetFamily() FeatureFlag = Item.GetFeatureFlagExp() SupArchList = ConvertArchList(Item.GetSupArchList()) SupArchList.sort() Source = SourceFileObject() Source.SetSourceFile(SourceFile) Source.SetFamily(Family) Source.SetFeatureFlag(FeatureFlag) Source.SetSupArchList(SupArchList) SourceList.append(Source) self.SetSourceFileList(self.GetSourceFileList() + SourceList)
def FromXml(self, Item, Key): self.ToolChainFamily = XmlAttribute(Item, 'Family') self.SourceFile = XmlElement(Item, 'Filename') self.CommonDefines.FromXml(Item, Key) self.CommonDefines.FeatureFlag = ConvertNOTEQToNE(self.CommonDefines.FeatureFlag) SourceFile = SourceFileObject() SourceFile.SetSourceFile(self.SourceFile) SourceFile.SetFamily(self.ToolChainFamily) SourceFile.SetSupArchList(self.CommonDefines.SupArchList) SourceFile.SetFeatureFlag(self.CommonDefines.FeatureFlag) return SourceFile