mirror of https://github.com/acidanthera/audk.git
BaseTool: Support EDKII style GUID definition for VFR function.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16330 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
4a2928934b
commit
8200fcfe54
|
@ -2935,7 +2935,8 @@ class ModuleAutoGen(AutoGen):
|
||||||
#
|
#
|
||||||
def _GetGuidList(self):
|
def _GetGuidList(self):
|
||||||
if self._GuidList == None:
|
if self._GuidList == None:
|
||||||
self._GuidList = self.Module.Guids
|
self._GuidList = sdict()
|
||||||
|
self._GuidList.update(self.Module.Guids)
|
||||||
for Library in self.DependentLibraryList:
|
for Library in self.DependentLibraryList:
|
||||||
self._GuidList.update(Library.Guids)
|
self._GuidList.update(Library.Guids)
|
||||||
self.UpdateComments(self._GuidComments, Library.GuidComments)
|
self.UpdateComments(self._GuidComments, Library.GuidComments)
|
||||||
|
@ -2955,7 +2956,8 @@ class ModuleAutoGen(AutoGen):
|
||||||
#
|
#
|
||||||
def _GetProtocolList(self):
|
def _GetProtocolList(self):
|
||||||
if self._ProtocolList == None:
|
if self._ProtocolList == None:
|
||||||
self._ProtocolList = self.Module.Protocols
|
self._ProtocolList = sdict()
|
||||||
|
self._ProtocolList.update(self.Module.Protocols)
|
||||||
for Library in self.DependentLibraryList:
|
for Library in self.DependentLibraryList:
|
||||||
self._ProtocolList.update(Library.Protocols)
|
self._ProtocolList.update(Library.Protocols)
|
||||||
self.UpdateComments(self._ProtocolComments, Library.ProtocolComments)
|
self.UpdateComments(self._ProtocolComments, Library.ProtocolComments)
|
||||||
|
@ -2968,7 +2970,8 @@ class ModuleAutoGen(AutoGen):
|
||||||
#
|
#
|
||||||
def _GetPpiList(self):
|
def _GetPpiList(self):
|
||||||
if self._PpiList == None:
|
if self._PpiList == None:
|
||||||
self._PpiList = self.Module.Ppis
|
self._PpiList = sdict()
|
||||||
|
self._PpiList.update(self.Module.Ppis)
|
||||||
for Library in self.DependentLibraryList:
|
for Library in self.DependentLibraryList:
|
||||||
self._PpiList.update(Library.Ppis)
|
self._PpiList.update(Library.Ppis)
|
||||||
self.UpdateComments(self._PpiComments, Library.PpiComments)
|
self.UpdateComments(self._PpiComments, Library.PpiComments)
|
||||||
|
|
|
@ -1550,6 +1550,17 @@ def CreateCode(Info, AutoGenC, AutoGenH, StringH, UniGenCFlag, UniGenBinBuffer):
|
||||||
StringH.Append(gAutoGenHeaderString.Replace({'FileName':FileName}))
|
StringH.Append(gAutoGenHeaderString.Replace({'FileName':FileName}))
|
||||||
StringH.Append(gAutoGenHPrologueString.Replace({'File':'STRDEFS', 'Guid':Info.Guid.replace('-','_')}))
|
StringH.Append(gAutoGenHPrologueString.Replace({'File':'STRDEFS', 'Guid':Info.Guid.replace('-','_')}))
|
||||||
CreateUnicodeStringCode(Info, AutoGenC, StringH, UniGenCFlag, UniGenBinBuffer)
|
CreateUnicodeStringCode(Info, AutoGenC, StringH, UniGenCFlag, UniGenBinBuffer)
|
||||||
|
|
||||||
|
GuidMacros = []
|
||||||
|
for Guid in Info.Module.Guids:
|
||||||
|
if Guid in Info.Module.GetGuidsUsedByPcd():
|
||||||
|
continue
|
||||||
|
GuidMacros.append('#define %s %s' % (Guid, Info.Module.Guids[Guid]))
|
||||||
|
for Guid, Value in Info.Module.Protocols.items() + Info.Module.Ppis.items():
|
||||||
|
GuidMacros.append('#define %s %s' % (Guid, Value))
|
||||||
|
if GuidMacros:
|
||||||
|
StringH.Append('\n#ifdef VFRCOMPILE\n%s\n#endif\n' % '\n'.join(GuidMacros))
|
||||||
|
|
||||||
StringH.Append("\n#endif\n")
|
StringH.Append("\n#endif\n")
|
||||||
AutoGenH.Append('#include "%s"\n' % FileName)
|
AutoGenH.Append('#include "%s"\n' % FileName)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue