]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Eot/c.py
BaseTools: use set instead of list for a variable to be used with in
[mirror_edk2.git] / BaseTools / Source / Python / Eot / c.py
index 8b11ed378f0e74cd1e4fa8fed5877b04c1e1c9ae..8199ce5ee73edefdef65649f66c082fd318305cd 100644 (file)
@@ -1,9 +1,9 @@
 ## @file\r
 # preprocess source file\r
 #\r
-#  Copyright (c) 2007 - 2010, Intel Corporation\r
+#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
 #\r
-#  All rights reserved. This program and the accompanying materials\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
 #  http://opensource.org/licenses/bsd-license.php\r
@@ -16,7 +16,7 @@
 # Import Modules\r
 #\r
 import sys\r
-import os\r
+import Common.LongFilePathOs as os\r
 import re\r
 import CodeFragmentCollector\r
 import FileProfile\r
@@ -31,16 +31,6 @@ IncludePathListDict = {}
 ComplexTypeDict = {}\r
 SUDict = {}\r
 \r
-## GetIgnoredDirListPattern() method\r
-#\r
-#  Get the pattern of ignored direction list\r
-#\r
-#  @return p:    the pattern of ignored direction list\r
-#\r
-def GetIgnoredDirListPattern():\r
-    p = re.compile(r'.*[\\/](?:BUILD|INTELRESTRICTEDTOOLS|INTELRESTRICTEDPKG|PCCTS)[\\/].*')\r
-    return p\r
-\r
 ## GetFuncDeclPattern() method\r
 #\r
 #  Get the pattern of function declaration\r
@@ -353,9 +343,12 @@ def GetFunctionList():
 def CreateCCodeDB(FileNameList):\r
     FileObjList = []\r
     ParseErrorFileList = []\r
-\r
+    ParsedFiles = {}\r
     for FullName in FileNameList:\r
         if os.path.splitext(FullName)[1] in ('.h', '.c'):\r
+            if FullName.lower() in ParsedFiles:\r
+                continue\r
+            ParsedFiles[FullName.lower()] = 1\r
             EdkLogger.info("Parsing " + FullName)\r
             model = FullName.endswith('c') and DataClass.MODEL_FILE_C or DataClass.MODEL_FILE_H\r
             collector = CodeFragmentCollector.CodeFragmentCollector(FullName)\r