From 645a51287e9519eb4c6d27b4e4f11d0556a624e8 Mon Sep 17 00:00:00 2001 From: Hess Chen Date: Fri, 29 Jul 2016 10:30:56 +0800 Subject: 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 Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py') diff --git a/BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py b/BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py index 11b0359176..436dc90e6d 100644 --- a/BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py +++ b/BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py @@ -1,7 +1,7 @@ ## @file DecPomAlignment.py # This file contained the adapter for convert INF parser object to POM Object # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
# # 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_STR_TOKENHELP from Library.DataType import TAB_STR_TOKENERR from Library.DataType import TAB_HEX_START from Library.DataType import TAB_SPLIT +import Library.DataType as DT from Library.CommentParsing import ParseHeaderCommentSection from Library.CommentParsing import ParseGenericComment from Library.CommentParsing import ParseDecPcdGenericComment @@ -221,6 +222,14 @@ class DecPomAlignment(PackageObject): self.SetUserExtensionList( self.GetUserExtensionList() + [UserExtension] ) + + # Add Private sections to UserExtension + if self.DecParser.GetPrivateSections(): + PrivateUserExtension = UserExtensionObject() + PrivateUserExtension.SetStatement(self.DecParser.GetPrivateSections()) + PrivateUserExtension.SetIdentifier(DT.TAB_PRIVATE) + PrivateUserExtension.SetUserID(DT.TAB_INTEL) + self.SetUserExtensionList(self.GetUserExtensionList() + [PrivateUserExtension]) ## Generate miscellaneous files on DEC file # -- cgit v1.2.3