summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/UPT/GenMetaFile
diff options
context:
space:
mode:
authorHess Chen <hesheng.chen@intel.com>2016-07-29 10:30:56 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2016-08-03 10:49:31 +0800
commit645a51287e9519eb4c6d27b4e4f11d0556a624e8 (patch)
treec45139eb17cd0bc7ce985ebd4aa40aa28d9c3258 /BaseTools/Source/Python/UPT/GenMetaFile
parent6cf9903481f07859cb0013598d2d13309d4e4644 (diff)
downloadedk2-platforms-645a51287e9519eb4c6d27b4e4f11d0556a624e8.tar.xz
BaseTool/Upt: Add support for Private
Support new syntax in package DEC file as below: [Includes.Common.Private] [Ppis.Common.Private] [Guids.Common.Private] [Protocols.Common.Private] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/UPT/GenMetaFile')
-rw-r--r--BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py b/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py
index f22363b3b9..31abd23ccd 100644
--- a/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py
+++ b/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py
@@ -2,7 +2,7 @@
#
# This file contained the logical of transfer package object to DEC files.
#
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this
@@ -63,6 +63,7 @@ from Library.DataType import TAB_PCD_ERROR
from Library.DataType import TAB_SECTION_START
from Library.DataType import TAB_SECTION_END
from Library.DataType import TAB_SPLIT
+import Library.DataType as DT
from Library.UniClassObject import FormatUniEntry
def GenPcd(Package, Content):
@@ -487,6 +488,12 @@ def PackageToDec(Package, DistHeader = None):
if UserExtension.GetUserID() == TAB_BINARY_HEADER_USERID and \
UserExtension.GetIdentifier() == TAB_BINARY_HEADER_IDENTIFIER:
continue
+
+ # Generate Private Section first
+ if UserExtension.GetUserID() == DT.TAB_INTEL and UserExtension.GetIdentifier() == DT.TAB_PRIVATE:
+ Content += '\n' + UserExtension.GetStatement()
+ continue
+
Statement = UserExtension.GetStatement()
if not Statement:
continue