]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Common/MigrationUtilities.py
BaseTools: cleanup class heirarchy
[mirror_edk2.git] / BaseTools / Source / Python / Common / MigrationUtilities.py
index b15daa8448167a6a30e129da0621e3caa32040fa..e9f1cabcb79432305c62e2128cba4c4db27acd33 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # Contains several utilitities shared by migration tools.\r
 #\r
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\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
 ##\r
 # Import Modules\r
 #\r
-import os\r
+import Common.LongFilePathOs as os\r
 import re\r
 import EdkLogger\r
 from optparse import OptionParser\r
 from Common.BuildToolError import *\r
 from XmlRoutines import *\r
 from CommonDataClass.CommonClass import *\r
+from Common.LongFilePathSupport import OpenLongFilePath as open\r
 \r
 ## Set all fields of CommonClass object.\r
 #\r
@@ -360,7 +361,7 @@ def StoreTextFile(TextFile, Content):
 # The possible duplication is ensured to be removed.\r
 #\r
 # @param  Section            Section dictionary indexed by CPU architecture.\r
-# @param  Arch               CPU architecture: Ia32, X64, Ipf, ARM, Ebc or Common.\r
+# @param  Arch               CPU architecture: Ia32, X64, Ipf, ARM, AARCH64, Ebc or Common.\r
 # @param  Item               The Item to be added to section dictionary.\r
 #\r
 def AddToSection(Section, Arch, Item):\r
@@ -382,7 +383,7 @@ def AddToSection(Section, Arch, Item):
 # @retval Section            The string content of a section.\r
 #\r
 def GetSection(SectionName, Method, ObjectList):\r
-    SupportedArches = ["common", "Ia32", "X64", "Ipf", "Ebc", "ARM"]\r
+    SupportedArches = ["common", "Ia32", "X64", "Ipf", "Ebc", "ARM", "AARCH64"]\r
     SectionDict = {}\r
     for Object in ObjectList:\r
         Item = Method(Object)\r
@@ -422,7 +423,7 @@ def StoreHeader(TextFile, CommonHeader):
     Description = CommonHeader.Description\r
     License = CommonHeader.License\r
 \r
-    Header =  "#/** @file\n#\n"\r
+    Header = "#/** @file\n#\n"\r
     Header += "# " + Abstract + "\n#\n"\r
     Header += "# " + Description.strip().replace("\n", "\n# ") + "\n"\r
     Header += "# " + CopyRight + "\n#\n"\r
@@ -518,7 +519,7 @@ def GetXmlFileInfo(FileName, TagTuple):
 # @retval Options            A optparse object containing the parsed options.\r
 # @retval InputFile          Path of an source file to be migrated.\r
 #\r
-def MigrationOptionParser(Source, Destinate, ToolName, VersionNumber = 1.0):\r
+def MigrationOptionParser(Source, Destinate, ToolName, VersionNumber=1.0):\r
     # use clearer usage to override default usage message\r
     UsageString = "%s [-a] [-v|-q] [-o <output_file>] <input_file>" % ToolName\r
     Version = "%s Version %.2f" % (ToolName, VersionNumber)\r