diff options
author | Yunhua Feng <yunhuax.feng@intel.com> | 2018-04-10 10:50:25 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-04-19 15:47:36 +0800 |
commit | 3378782691af1158560579444a23bdd2f0a7d154 (patch) | |
tree | 874bffae0e6bf6d2f94be67fa08cc87f8d37f660 /BaseTools | |
parent | 25598f8bdbd63dd96194fd3f43dd53dd814cd1c0 (diff) | |
download | edk2-3378782691af1158560579444a23bdd2f0a7d154.tar.gz edk2-3378782691af1158560579444a23bdd2f0a7d154.tar.bz2 edk2-3378782691af1158560579444a23bdd2f0a7d154.zip |
BaseTools: Support DSC component !include PCD items
DSC format:
[Components]
TestPkg/TestDriver.inf {
<PcdsFixedAtBuild>
!include TestPkg/Test.txt
}
Test.txt content:
PcdToken.PcdCName | 0x123
Per spec we should support this usage.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r-- | BaseTools/Source/Python/Workspace/MetaFileParser.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index 3d12314717..322ed38449 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1538,9 +1538,13 @@ class DscParser(MetaFileParser): self._FileWithError = IncludedFile1
IncludedFileTable = MetaFileStorage(self._Table.Cur, IncludedFile1, MODEL_FILE_DSC, False)
- Owner = self._Content[self._ContentIndex - 1][0]
+ FromItem = self._Content[self._ContentIndex - 1][0]
+ if self._Content[self._ContentIndex - 1][8] != -1.0:
+ Owner = self._Content[self._ContentIndex - 1][8]
+ else:
+ Owner = self._Content[self._ContentIndex - 1][0]
Parser = DscParser(IncludedFile1, self._FileType, self._Arch, IncludedFileTable,
- Owner=Owner, From=Owner)
+ Owner=Owner, From=FromItem)
self.IncludedFiles.add (IncludedFile1)
@@ -1552,7 +1556,10 @@ class DscParser(MetaFileParser): # set the parser status with current status
Parser._SectionName = self._SectionName
- Parser._SectionType = self._SectionType
+ if self._InSubsection:
+ Parser._SectionType = self._SubsectionType
+ else:
+ Parser._SectionType = self._SectionType
Parser._Scope = self._Scope
Parser._Enabled = self._Enabled
# Parse the included file
|