]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: remove unused file
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>
Thu, 5 Apr 2018 23:13:49 +0000 (07:13 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 10 Apr 2018 01:58:08 +0000 (09:58 +0800)
ToolsDefClassObject didnt need Dictionary, it needed an import from there.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/Common/Dictionary.py [deleted file]
BaseTools/Source/Python/Common/ToolDefClassObject.py
BaseTools/Source/Python/Makefile

diff --git a/BaseTools/Source/Python/Common/Dictionary.py b/BaseTools/Source/Python/Common/Dictionary.py
deleted file mode 100644 (file)
index f653275..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-## @file\r
-# Define a dictionary structure\r
-#\r
-# Copyright (c) 2007 - 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
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-\r
-##\r
-# Import Modules\r
-#\r
-import EdkLogger\r
-from DataType import *\r
-from Common.LongFilePathSupport import OpenLongFilePath as open\r
-\r
-## Convert a text file to a dictionary\r
-#\r
-# Convert a text file to a dictionary of (name:value) pairs.\r
-#\r
-# @retval 0  Convert successful\r
-# @retval 1  Open file failed\r
-#\r
-def ConvertTextFileToDictionary(FileName, Dictionary, CommentCharacter, KeySplitCharacter, ValueSplitFlag, ValueSplitCharacter):\r
-    try:\r
-        F = open(FileName, 'r')\r
-        Keys = []\r
-        for Line in F:\r
-            if Line.startswith(CommentCharacter):\r
-                continue\r
-            LineList = Line.split(KeySplitCharacter, 1)\r
-            if len(LineList) >= 2:\r
-                Key = LineList[0].split()\r
-            if len(Key) == 1 and Key[0][0] != CommentCharacter and Key[0] not in Keys:\r
-                if ValueSplitFlag:\r
-                    Dictionary[Key[0]] = LineList[1].replace('\\', '/').split(ValueSplitCharacter)\r
-                else:\r
-                    Dictionary[Key[0]] = LineList[1].strip().replace('\\', '/')\r
-                Keys += [Key[0]]\r
-        F.close()\r
-        return 0\r
-    except:\r
-        EdkLogger.info('Open file failed')\r
-        return 1\r
-\r
-## Print the dictionary\r
-#\r
-# Print all items of dictionary one by one\r
-#\r
-# @param Dict:  The dictionary to be printed\r
-#\r
-def printDict(Dict):\r
-    if Dict is not None:\r
-        KeyList = Dict.keys()\r
-        for Key in KeyList:\r
-            if Dict[Key] != '':\r
-                print Key + ' = ' + str(Dict[Key])\r
-\r
-## Print the dictionary\r
-#\r
-# Print the items of dictionary which matched with input key\r
-#\r
-# @param list:  The dictionary to be printed\r
-# @param key:   The key of the item to be printed\r
-#\r
-def printList(Key, List):\r
-    if type(List) == type([]):\r
-        if len(List) > 0:\r
-            if Key.find(TAB_SPLIT) != -1:\r
-                print "\n" + Key\r
-                for Item in List:\r
-                    print Item\r
index 1ab848f1ec68af432ef04a32fcb3806ffcef71d4..73ebdaf6b1793646fffcfc3fe06e1835c510fe99 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to define each component of tools_def.txt file\r
 #\r
-# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 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
@@ -18,7 +18,6 @@ import Common.LongFilePathOs as os
 import re\r
 import EdkLogger\r
 \r
-from Dictionary import *\r
 from BuildToolError import *\r
 from TargetTxtClassObject import *\r
 from Common.LongFilePathSupport import OpenLongFilePath as open\r
@@ -27,6 +26,10 @@ from Common.String import NormPath
 import Common.GlobalData as GlobalData\r
 from Common import GlobalData\r
 from Common.MultipleWorkspace import MultipleWorkspace as mws\r
+from DataType import TAB_TOD_DEFINES_TARGET,TAB_TOD_DEFINES_TOOL_CHAIN_TAG,\\r
+                     TAB_TOD_DEFINES_TARGET_ARCH,TAB_TOD_DEFINES_COMMAND_TYPE\\r
+                     ,TAB_TOD_DEFINES_FAMILY,TAB_TOD_DEFINES_BUILDRULEFAMILY\r
+\r
 \r
 ##\r
 # Static variables used for pattern\r
index 02af9aed1c33b27cbd575a4277c00c7fdc6c1533..d985187818aedd369755bff27808f0c250e61546 100644 (file)
@@ -38,7 +38,6 @@ COMMON_PYTHON=$(BASE_TOOLS_PATH)\Source\Python\Common\BuildToolError.py \
               $(BASE_TOOLS_PATH)\Source\Python\Common\Database.py \\r
               $(BASE_TOOLS_PATH)\Source\Python\Common\DataType.py \\r
               $(BASE_TOOLS_PATH)\Source\Python\Common\DecClassObject.py \\r
-              $(BASE_TOOLS_PATH)\Source\Python\Common\Dictionary.py \\r
               $(BASE_TOOLS_PATH)\Source\Python\Common\DscClassObject.py \\r
               $(BASE_TOOLS_PATH)\Source\Python\Common\EdkIIWorkspace.py \\r
               $(BASE_TOOLS_PATH)\Source\Python\Common\EdkIIWorkspaceBuild.py \\r