]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Eot/InfParserLite.py
BaseTools/EOT: Change to call a program instead of calling Python API.
[mirror_edk2.git] / BaseTools / Source / Python / Eot / InfParserLite.py
index 88d7e7d58e0bbe022240c83382c8693ccdd2544a..c910c129a719a609b2fc6a7978f6c0e226bb749b 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to parse INF file of EDK project\r
 #\r
-# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, 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
@@ -22,8 +22,9 @@ from Common.DataType import *
 from CommonDataClass.DataClass import *\r
 from Common.Identification import *\r
 from Common.StringUtils import *\r
-from .Parser import *\r
-from . import Database\r
+from Eot.Parser import *\r
+from Eot import Database\r
+from Eot import EotGlobalData\r
 \r
 ## EdkInfParser() class\r
 #\r
@@ -153,21 +154,4 @@ class EdkInfParser(object):
         self.ParserSource(CurrentSection, SectionItemList, ArchList, ThirdList)\r
         #End of For\r
 \r
-##\r
-#\r
-# This acts like the main() function for the script, unless it is 'import'ed into another\r
-# script.\r
-#\r
-if __name__ == '__main__':\r
-    EdkLogger.Initialize()\r
-    EdkLogger.SetLevel(EdkLogger.QUIET)\r
-\r
-    Db = Database.Database('Inf.db')\r
-    Db.InitDatabase()\r
-    P = EdkInfParser(os.path.normpath("C:\Framework\Edk\Sample\Platform\Nt32\Dxe\PlatformBds\PlatformBds.inf"), Db, '', '')\r
-    for Inf in P.Sources:\r
-        print(Inf)\r
-    for Item in P.Macros:\r
-        print(Item, P.Macros[Item])\r
-\r
-    Db.Close()\r
+\r