mirror of https://github.com/acidanthera/audk.git
BaseTools: Support multiple .h file
for structure Pcd declaration in DEC file. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
5db9414cc1
commit
81add864f4
|
@ -115,7 +115,7 @@ class StructurePcd(PcdClassObject):
|
|||
if validlists is None: validlists=[]
|
||||
if expressions is None : expressions=[]
|
||||
super(StructurePcd, self).__init__(Name, Guid, Type, DatumType, Value, Token, MaxDatumSize, SkuInfoList, IsOverrided, GuidValue, validateranges, validlists, expressions)
|
||||
self.StructuredPcdIncludeFile = StructuredPcdIncludeFile
|
||||
self.StructuredPcdIncludeFile = [] if StructuredPcdIncludeFile is None else StructuredPcdIncludeFile
|
||||
self.PackageDecs = Packages
|
||||
self.DefaultStoreName = [default_store]
|
||||
self.DefaultValues = collections.OrderedDict({})
|
||||
|
|
|
@ -376,7 +376,7 @@ class DecBuildData(PackageBuildClassObject):
|
|||
struct_pcd = StructurePcd()
|
||||
for item,LineNo in s_pcd_set[pcdname]:
|
||||
if "<HeaderFiles>" in item.TokenCName:
|
||||
struct_pcd.StructuredPcdIncludeFile = item.DefaultValue
|
||||
struct_pcd.StructuredPcdIncludeFile.append(item.DefaultValue)
|
||||
elif "<Packages>" in item.TokenCName:
|
||||
dep_pkgs.append(item.DefaultValue)
|
||||
elif item.DatumType == item.TokenCName:
|
||||
|
|
|
@ -1470,10 +1470,10 @@ class DscBuildData(PlatformBuildClassObject):
|
|||
Includes = {}
|
||||
for PcdName in StructuredPcds:
|
||||
Pcd = StructuredPcds[PcdName]
|
||||
IncludeFile = Pcd.StructuredPcdIncludeFile
|
||||
if IncludeFile not in Includes:
|
||||
Includes[IncludeFile] = True
|
||||
CApp = CApp + '#include <%s>\n' % (IncludeFile)
|
||||
for IncludeFile in Pcd.StructuredPcdIncludeFile:
|
||||
if IncludeFile not in Includes:
|
||||
Includes[IncludeFile] = True
|
||||
CApp = CApp + '#include <%s>\n' % (IncludeFile)
|
||||
CApp = CApp + '\n'
|
||||
|
||||
for PcdName in StructuredPcds:
|
||||
|
|
|
@ -1893,22 +1893,24 @@ class DecParser(MetaFileParser):
|
|||
if "|" not in self._CurrentLine:
|
||||
if "<HeaderFiles>" == self._CurrentLine:
|
||||
self._include_flag = True
|
||||
self._package_flag = False
|
||||
self._ValueList = None
|
||||
return
|
||||
if "<Packages>" == self._CurrentLine:
|
||||
self._package_flag = True
|
||||
self._ValueList = None
|
||||
self._include_flag = False
|
||||
return
|
||||
|
||||
if self._include_flag:
|
||||
self._ValueList[1] = "<HeaderFiles>_" + md5.new(self._CurrentLine).hexdigest()
|
||||
self._ValueList[2] = self._CurrentLine
|
||||
self._include_flag = False
|
||||
if self._package_flag and "}" != self._CurrentLine:
|
||||
self._ValueList[1] = "<Packages>_" + md5.new(self._CurrentLine).hexdigest()
|
||||
self._ValueList[2] = self._CurrentLine
|
||||
if self._CurrentLine == "}":
|
||||
self._package_flag = False
|
||||
self._include_flag = False
|
||||
self._ValueList = None
|
||||
return
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue