]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Eot/Parser.py
There is a limitation on WINDOWS OS for the length of entire file path can’t be large...
[mirror_edk2.git] / BaseTools / Source / Python / Eot / Parser.py
index 9ef71a958769dc17050bb2b7c8faac8ff016772f..ab19e30b69aa1c0749a4d160c27ae94c5918761b 100644 (file)
@@ -2,7 +2,7 @@
 # This file is used to define common parsing related functions used in parsing\r
 # Inf/Dsc/Makefile process\r
 #\r
-# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
 ##\r
 # Import Modules\r
 #\r
-import os, re\r
+import Common.LongFilePathOs as os, re\r
 import Common.EdkLogger as EdkLogger\r
 from Common.DataType import *\r
 from CommonDataClass.DataClass import *\r
 from Common.String import CleanString, GetSplitValueList, ReplaceMacro\r
 import EotGlobalData\r
 from Common.Misc import sdict\r
+from Common.String import GetSplitList\r
+from Common.LongFilePathSupport import OpenLongFilePath as open\r
 \r
 ## PreProcess() method\r
 #\r
@@ -49,11 +51,11 @@ def PreProcess(Filename, MergeMultipleLines = True, LineNo = -1):
     for Line in open(Filename, 'r'):\r
         Line = Line.strip()\r
         # Remove comment block\r
-        if Line.find(TAB_COMMENT_R8_START) > -1:\r
-            ReservedLine = GetSplitValueList(Line, TAB_COMMENT_R8_START, 1)[0]\r
+        if Line.find(TAB_COMMENT_EDK_START) > -1:\r
+            ReservedLine = GetSplitList(Line, TAB_COMMENT_EDK_START, 1)[0]\r
             IsFindBlockComment = True\r
-        if Line.find(TAB_COMMENT_R8_END) > -1:\r
-            Line = ReservedLine + GetSplitValueList(Line, TAB_COMMENT_R8_END, 1)[1]\r
+        if Line.find(TAB_COMMENT_EDK_END) > -1:\r
+            Line = ReservedLine + GetSplitList(Line, TAB_COMMENT_EDK_END, 1)[1]\r
             ReservedLine = ''\r
             IsFindBlockComment = False\r
         if IsFindBlockComment:\r