diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-25 06:21:03 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-25 06:21:03 +0000 |
commit | 2bcc713e74b944bb5aefb433ef33fb4002a62d76 (patch) | |
tree | 7aa002279415c1fafbedbf287d256177746e0a4a /BaseTools/Source/Python/UPT/Parser/InfParser.py | |
parent | c32dcd284c19bbb0b1db3606a243d9d69d37d6ab (diff) | |
download | edk2-2bcc713e74b944bb5aefb433ef33fb4002a62d76.tar.gz edk2-2bcc713e74b944bb5aefb433ef33fb4002a62d76.tar.bz2 edk2-2bcc713e74b944bb5aefb433ef33fb4002a62d76.zip |
Sync BaseTool trunk (version r2423) into EDKII BaseTools. The change mainly includes:
1. Fix !include issues
2. Fix Trim to skip the postfix 'U' for hexadecimal and decimal numbers
3. Fix building error C2733 when building C++ code.
4. Add GCC46 tool chain definition
5. Add new RVCT and RVCTLINUX tool chains
Signed-off-by: lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12782 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/UPT/Parser/InfParser.py')
-rw-r--r-- | BaseTools/Source/Python/UPT/Parser/InfParser.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/UPT/Parser/InfParser.py b/BaseTools/Source/Python/UPT/Parser/InfParser.py index aa44e8038d..79f71448ee 100644 --- a/BaseTools/Source/Python/UPT/Parser/InfParser.py +++ b/BaseTools/Source/Python/UPT/Parser/InfParser.py @@ -26,6 +26,7 @@ from copy import deepcopy from Library.String import GetSplitValueList
from Library.String import ConvertSpecialChar
from Library.Misc import ProcessLineExtender
+from Library.Misc import ProcessEdkComment
from Library.Parsing import NormPath
from Library.ParserValidate import IsValidInfMoudleTypeList
from Library.ParserValidate import IsValidArch
@@ -165,6 +166,12 @@ class InfParser(InfSectionParser): FileLinesList = ProcessLineExtender(FileLinesList)
#
+ # Process EdkI INF style comment if found
+ #
+ OrigLines = [Line for Line in FileLinesList]
+ FileLinesList, EdkCommentStartPos = ProcessEdkComment(FileLinesList)
+
+ #
# Judge whether the INF file is Binary INF or not
#
if IsBinaryInf(FileLinesList):
@@ -339,6 +346,17 @@ class InfParser(InfSectionParser): File=self.FullPath)
#
+ # EDKII INF should not have EDKI style comment
+ #
+ if EdkCommentStartPos != -1:
+ Logger.Error("InfParser",
+ FORMAT_INVALID,
+ ST.ERR_INF_PARSER_EDKI_COMMENT_IN_EDKII,
+ File=self.FullPath,
+ Line=EdkCommentStartPos + 1,
+ ExtraData=OrigLines[EdkCommentStartPos])
+
+ #
# extract [Event] [Hob] [BootMode] sections
#
self._ExtractEventHobBootMod(FileLinesList)
|