]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/GenMake.py
BaseTools: use set instead of list for a variable to be used with in
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / GenMake.py
index dcdfcca1a5b066e453752781268083a99265c3d2..b7594d8988da5a10ec6d35676a80de8670ed16ab 100644 (file)
@@ -25,6 +25,7 @@ from Common.Misc import *
 from Common.String import *\r
 from BuildEngine import *\r
 import Common.GlobalData as GlobalData\r
+from collections import OrderedDict\r
 \r
 ## Regular expression for finding header file inclusions\r
 gIncludePattern = re.compile(r"^[ \t]*#?[ \t]*include(?:[ \t]*(?:\\(?:\r\n|\r|\n))*[ \t]*)*(?:\(?[\"<]?[ \t]*)([-\w.\\/() \t]+)(?:[ \t]*[\">]?\)?)", re.MULTILINE | re.UNICODE | re.IGNORECASE)\r
@@ -442,7 +443,7 @@ cleanlib:
         self.LibraryMakefileList = []\r
         self.LibraryBuildDirectoryList = []\r
         self.SystemLibraryList = []\r
-        self.Macros = sdict()\r
+        self.Macros = OrderedDict()\r
         self.Macros["OUTPUT_DIR"      ] = self._AutoGenObject.Macros["OUTPUT_DIR"]\r
         self.Macros["DEBUG_DIR"       ] = self._AutoGenObject.Macros["DEBUG_DIR"]\r
         self.Macros["MODULE_BUILD_DIR"] = self._AutoGenObject.Macros["MODULE_BUILD_DIR"]\r
@@ -491,7 +492,7 @@ cleanlib:
             ImageEntryPoint = "_ModuleEntryPoint"\r
 \r
         for k, v in self._AutoGenObject.Module.Defines.iteritems():\r
-            if k not in self._AutoGenObject.Macros.keys():\r
+            if k not in self._AutoGenObject.Macros:\r
                 self._AutoGenObject.Macros[k] = v\r
 \r
         if 'MODULE_ENTRY_POINT' not in self._AutoGenObject.Macros.keys():\r