X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FCommon%2FMigrationUtilities.py;h=e9f1cabcb79432305c62e2128cba4c4db27acd33;hb=4d603daa3a2276d98ac6749d1db8e327ff7c1f5f;hp=b15daa8448167a6a30e129da0621e3caa32040fa;hpb=40d841f6a8f84e75409178e19e69b95e01bada0f;p=mirror_edk2.git diff --git a/BaseTools/Source/Python/Common/MigrationUtilities.py b/BaseTools/Source/Python/Common/MigrationUtilities.py index b15daa8448..e9f1cabcb7 100644 --- a/BaseTools/Source/Python/Common/MigrationUtilities.py +++ b/BaseTools/Source/Python/Common/MigrationUtilities.py @@ -1,7 +1,7 @@ ## @file # Contains several utilitities shared by migration tools. # -# Copyright (c) 2007, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -14,13 +14,14 @@ ## # Import Modules # -import os +import Common.LongFilePathOs as os import re import EdkLogger from optparse import OptionParser from Common.BuildToolError import * from XmlRoutines import * from CommonDataClass.CommonClass import * +from Common.LongFilePathSupport import OpenLongFilePath as open ## Set all fields of CommonClass object. # @@ -360,7 +361,7 @@ def StoreTextFile(TextFile, Content): # The possible duplication is ensured to be removed. # # @param Section Section dictionary indexed by CPU architecture. -# @param Arch CPU architecture: Ia32, X64, Ipf, ARM, Ebc or Common. +# @param Arch CPU architecture: Ia32, X64, Ipf, ARM, AARCH64, Ebc or Common. # @param Item The Item to be added to section dictionary. # def AddToSection(Section, Arch, Item): @@ -382,7 +383,7 @@ def AddToSection(Section, Arch, Item): # @retval Section The string content of a section. # def GetSection(SectionName, Method, ObjectList): - SupportedArches = ["common", "Ia32", "X64", "Ipf", "Ebc", "ARM"] + SupportedArches = ["common", "Ia32", "X64", "Ipf", "Ebc", "ARM", "AARCH64"] SectionDict = {} for Object in ObjectList: Item = Method(Object) @@ -422,7 +423,7 @@ def StoreHeader(TextFile, CommonHeader): Description = CommonHeader.Description License = CommonHeader.License - Header = "#/** @file\n#\n" + Header = "#/** @file\n#\n" Header += "# " + Abstract + "\n#\n" Header += "# " + Description.strip().replace("\n", "\n# ") + "\n" Header += "# " + CopyRight + "\n#\n" @@ -518,7 +519,7 @@ def GetXmlFileInfo(FileName, TagTuple): # @retval Options A optparse object containing the parsed options. # @retval InputFile Path of an source file to be migrated. # -def MigrationOptionParser(Source, Destinate, ToolName, VersionNumber = 1.0): +def MigrationOptionParser(Source, Destinate, ToolName, VersionNumber=1.0): # use clearer usage to override default usage message UsageString = "%s [-a] [-v|-q] [-o ] " % ToolName Version = "%s Version %.2f" % (ToolName, VersionNumber)