diff options
Diffstat (limited to 'BaseTools/Source/Python/Workspace')
4 files changed, 9 insertions, 7 deletions
diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py b/BaseTools/Source/Python/Workspace/BuildClassObject.py index 3afb27a9c0..0e1161c96f 100644 --- a/BaseTools/Source/Python/Workspace/BuildClassObject.py +++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py @@ -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({})
diff --git a/BaseTools/Source/Python/Workspace/DecBuildData.py b/BaseTools/Source/Python/Workspace/DecBuildData.py index f6b908dee6..2fd3820dcc 100644 --- a/BaseTools/Source/Python/Workspace/DecBuildData.py +++ b/BaseTools/Source/Python/Workspace/DecBuildData.py @@ -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:
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index 8c5afb5bf4..84f7b6a237 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -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:
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index c928cef70f..57642de4ee 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -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:
|