]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Remove EdkIIWorkspaceBuild.py from source code
authorFeng, YunhuaX </o=Intel/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=Feng, YunhuaX4e1>
Wed, 4 Apr 2018 05:53:13 +0000 (13:53 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 10 Apr 2018 06:28:17 +0000 (14:28 +0800)
Remove EdkIIWorkspaceBuild.py from source code

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py [deleted file]
BaseTools/Source/Python/Makefile

diff --git a/BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py b/BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py
deleted file mode 100644 (file)
index c4f45b7..0000000
+++ /dev/null
@@ -1,1670 +0,0 @@
-## @file\r
-# This file is used to define each component of the build database\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 Common.LongFilePathOs as os, string, copy, pdb, copy\r
-import EdkLogger\r
-import DataType\r
-from InfClassObject import *\r
-from DecClassObject import *\r
-from DscClassObject import *\r
-from String import *\r
-from BuildToolError import *\r
-from collections import OrderedDict\r
-import Database as Database\r
-import time as time\r
-\r
-## PcdClassObject\r
-#\r
-# This Class is used for PcdObject\r
-# \r
-# @param object:             Inherited from object class\r
-# @param Name:               Input value for Name of Pcd, default is None\r
-# @param Guid:               Input value for Guid of Pcd, default is None\r
-# @param Type:               Input value for Type of Pcd, default is None\r
-# @param DatumType:          Input value for DatumType of Pcd, default is None\r
-# @param Value:              Input value for Value of Pcd, default is None\r
-# @param Token:              Input value for Token of Pcd, default is None\r
-# @param MaxDatumSize:       Input value for MaxDatumSize of Pcd, default is None\r
-# @param SkuInfoList:        Input value for SkuInfoList of Pcd, default is {}\r
-# @param IsOverrided:        Input value for IsOverrided of Pcd, default is False\r
-#\r
-# @var TokenCName:           To store value for TokenCName\r
-# @var TokenSpaceGuidCName:  To store value for TokenSpaceGuidCName\r
-# @var Type:                 To store value for Type\r
-# @var DatumType:            To store value for DatumType\r
-# @var TokenValue:           To store value for TokenValue\r
-# @var MaxDatumSize:         To store value for MaxDatumSize\r
-# @var SkuInfoList:          To store value for SkuInfoList\r
-# @var IsOverrided:          To store value for IsOverrided\r
-# @var Phase:                To store value for Phase, default is "DXE"\r
-#\r
-class PcdClassObject(object):\r
-    def __init__(self, Name = None, Guid = None, Type = None, DatumType = None, Value = None, Token = None, MaxDatumSize = None, SkuInfoList = {}, IsOverrided = False):\r
-        self.TokenCName = Name\r
-        self.TokenSpaceGuidCName = Guid\r
-        self.Type = Type\r
-        self.DatumType = DatumType\r
-        self.DefaultValue = Value\r
-        self.TokenValue = Token\r
-        self.MaxDatumSize = MaxDatumSize\r
-        self.SkuInfoList = SkuInfoList\r
-        self.IsOverrided = IsOverrided\r
-        self.Phase = "DXE"\r
-\r
-    ## Convert the class to a string\r
-    #\r
-    #  Convert each member of the class to string\r
-    #  Organize to a signle line format string\r
-    #\r
-    #  @retval Rtn Formatted String\r
-    #\r
-    def __str__(self):\r
-        Rtn = '\tTokenCName=' + str(self.TokenCName) + ', ' + \\r
-              'TokenSpaceGuidCName=' + str(self.TokenSpaceGuidCName) + ', ' + \\r
-              'Type=' + str(self.Type) + ', ' + \\r
-              'DatumType=' + str(self.DatumType) + ', ' + \\r
-              'DefaultValue=' + str(self.DefaultValue) + ', ' + \\r
-              'TokenValue=' + str(self.TokenValue) + ', ' + \\r
-              'MaxDatumSize=' + str(self.MaxDatumSize) + ', '\r
-        for Item in self.SkuInfoList.values():\r
-            Rtn = Rtn + 'SkuId=' + Item.SkuId + ', ' + 'SkuIdName=' + Item.SkuIdName\r
-        Rtn = Rtn + str(self.IsOverrided)\r
-\r
-        return Rtn\r
-\r
-    ## Override __eq__ function\r
-    #\r
-    # Check whether pcds are the same\r
-    #\r
-    # @retval False The two pcds are different\r
-    # @retval True  The two pcds are the same\r
-    #\r
-    def __eq__(self, Other):\r
-        return Other is not None and self.TokenCName == Other.TokenCName and self.TokenSpaceGuidCName == Other.TokenSpaceGuidCName\r
-\r
-    ## Override __hash__ function\r
-    #\r
-    # Use (TokenCName, TokenSpaceGuidCName) as key in hash table\r
-    #\r
-    # @retval truple() Key for hash table\r
-    #\r
-    def __hash__(self):\r
-        return hash((self.TokenCName, self.TokenSpaceGuidCName))\r
-\r
-## LibraryClassObject\r
-#\r
-# This Class defines LibraryClassObject used in BuildDatabase\r
-# \r
-# @param object:      Inherited from object class\r
-# @param Name:        Input value for LibraryClassName, default is None\r
-# @param SupModList:  Input value for SupModList, default is []\r
-# @param Type:        Input value for Type, default is None\r
-#\r
-# @var LibraryClass:  To store value for LibraryClass\r
-# @var SupModList:    To store value for SupModList\r
-# @var Type:          To store value for Type\r
-#\r
-class LibraryClassObject(object):\r
-    def __init__(self, Name = None, SupModList = [], Type = None):\r
-        self.LibraryClass = Name\r
-        self.SupModList = SupModList\r
-        if Type is not None:\r
-            self.SupModList = CleanString(Type).split(DataType.TAB_SPACE_SPLIT)\r
-\r
-## ModuleBuildClassObject\r
-#\r
-# This Class defines ModuleBuildClass\r
-# \r
-# @param object:               Inherited from object class\r
-#\r
-# @var DescFilePath:           To store value for DescFilePath\r
-# @var BaseName:               To store value for BaseName\r
-# @var ModuleType:             To store value for ModuleType\r
-# @var Guid:                   To store value for Guid\r
-# @var Version:                To store value for Version\r
-# @var PcdIsDriver:            To store value for PcdIsDriver\r
-# @var BinaryModule:           To store value for BinaryModule\r
-# @var CustomMakefile:         To store value for CustomMakefile\r
-# @var Specification:          To store value for Specification\r
-# @var Shadow                  To store value for Shadow\r
-# @var LibraryClass:           To store value for LibraryClass, it is a list structure as\r
-#                              [ LibraryClassObject, ...]\r
-# @var ModuleEntryPointList:   To store value for ModuleEntryPointList\r
-# @var ModuleUnloadImageList:  To store value for ModuleUnloadImageList\r
-# @var ConstructorList:        To store value for ConstructorList\r
-# @var DestructorList:         To store value for DestructorList\r
-# @var Binaries:               To store value for Binaries, it is a list structure as\r
-#                              [ ModuleBinaryClassObject, ...]\r
-# @var Sources:                To store value for Sources, it is a list structure as\r
-#                              [ ModuleSourceFilesClassObject, ... ]\r
-# @var LibraryClasses:         To store value for LibraryClasses, it is a set structure as\r
-#                              { [LibraryClassName, ModuleType] : LibraryClassInfFile }\r
-# @var Protocols:              To store value for Protocols, it is a list structure as\r
-#                              [ ProtocolName, ... ]\r
-# @var Ppis:                   To store value for Ppis, it is a list structure as\r
-#                              [ PpiName, ... ]\r
-# @var Guids:                  To store value for Guids, it is a list structure as\r
-#                              [ GuidName, ... ]\r
-# @var Includes:               To store value for Includes, it is a list structure as\r
-#                              [ IncludePath, ... ]\r
-# @var Packages:               To store value for Packages, it is a list structure as\r
-#                              [ DecFileName, ... ]\r
-# @var Pcds:                   To store value for Pcds, it is a set structure as\r
-#                              { [(PcdCName, PcdGuidCName)] : PcdClassObject}\r
-# @var BuildOptions:           To store value for BuildOptions, it is a set structure as\r
-#                              { [BuildOptionKey] : BuildOptionValue}\r
-# @var Depex:                  To store value for Depex\r
-#\r
-class ModuleBuildClassObject(object):\r
-    def __init__(self):\r
-        self.AutoGenVersion          = 0\r
-        self.DescFilePath            = ''\r
-        self.BaseName                = ''\r
-        self.ModuleType              = ''\r
-        self.Guid                    = ''\r
-        self.Version                 = ''\r
-        self.PcdIsDriver             = ''\r
-        self.BinaryModule            = ''\r
-        self.Shadow                  = ''\r
-        self.CustomMakefile          = {}\r
-        self.Specification           = {}\r
-        self.LibraryClass            = []\r
-        self.ModuleEntryPointList    = []\r
-        self.ModuleUnloadImageList   = []\r
-        self.ConstructorList         = []\r
-        self.DestructorList          = []\r
-\r
-        self.Binaries                = []\r
-        self.Sources                 = []\r
-        self.LibraryClasses          = OrderedDict()\r
-        self.Libraries               = []\r
-        self.Protocols               = []\r
-        self.Ppis                    = []\r
-        self.Guids                   = []\r
-        self.Includes                = []\r
-        self.Packages                = []\r
-        self.Pcds                    = {}\r
-        self.BuildOptions            = {}\r
-        self.Depex                   = ''\r
-\r
-    ## Convert the class to a string\r
-    #\r
-    #  Convert member DescFilePath of the class to a string\r
-    #\r
-    #  @retval string Formatted String\r
-    #\r
-    def __str__(self):\r
-        return self.DescFilePath\r
-\r
-    ## Override __eq__ function\r
-    #\r
-    # Check whether ModuleBuildClassObjects are the same\r
-    #\r
-    # @retval False The two ModuleBuildClassObjects are different\r
-    # @retval True  The two ModuleBuildClassObjects are the same\r
-    #\r
-    def __eq__(self, Other):\r
-        return self.DescFilePath == str(Other)\r
-\r
-    ## Override __hash__ function\r
-    #\r
-    # Use DescFilePath as key in hash table\r
-    #\r
-    # @retval string Key for hash table\r
-    #\r
-    def __hash__(self):\r
-        return hash(self.DescFilePath)\r
-\r
-## PackageBuildClassObject\r
-#\r
-# This Class defines PackageBuildClass\r
-# \r
-# @param object:        Inherited from object class\r
-#\r
-# @var DescFilePath:    To store value for DescFilePath\r
-# @var PackageName:     To store value for PackageName\r
-# @var Guid:            To store value for Guid\r
-# @var Version:         To store value for Version\r
-# @var Protocols:       To store value for Protocols, it is a set structure as\r
-#                       { [ProtocolName] : Protocol Guid, ... }\r
-# @var Ppis:            To store value for Ppis, it is a set structure as\r
-#                       { [PpiName] : Ppi Guid, ... }\r
-# @var Guids:           To store value for Guids, it is a set structure as\r
-#                       { [GuidName] : Guid, ... }\r
-# @var Includes:        To store value for Includes, it is a list structure as\r
-#                       [ IncludePath, ... ]\r
-# @var LibraryClasses:  To store value for LibraryClasses, it is a set structure as\r
-#                       { [LibraryClassName] : LibraryClassInfFile }\r
-# @var Pcds:            To store value for Pcds, it is a set structure as\r
-#                       { [(PcdCName, PcdGuidCName)] : PcdClassObject}\r
-#\r
-class PackageBuildClassObject(object):\r
-    def __init__(self):\r
-        self.DescFilePath            = ''\r
-        self.PackageName             = ''\r
-        self.Guid                    = ''\r
-        self.Version                 = ''\r
-\r
-        self.Protocols               = {}\r
-        self.Ppis                    = {}\r
-        self.Guids                   = {}\r
-        self.Includes                = []\r
-        self.LibraryClasses          = {}\r
-        self.Pcds                    = {}\r
-\r
-    ## Convert the class to a string\r
-    #\r
-    #  Convert member DescFilePath of the class to a string\r
-    #\r
-    #  @retval string Formatted String\r
-    #\r
-    def __str__(self):\r
-        return self.DescFilePath\r
-\r
-    ## Override __eq__ function\r
-    #\r
-    # Check whether PackageBuildClassObjects are the same\r
-    #\r
-    # @retval False The two PackageBuildClassObjects are different\r
-    # @retval True  The two PackageBuildClassObjects are the same\r
-    #\r
-    def __eq__(self, Other):\r
-        return self.DescFilePath == str(Other)\r
-\r
-    ## Override __hash__ function\r
-    #\r
-    # Use DescFilePath as key in hash table\r
-    #\r
-    # @retval string Key for hash table\r
-    #\r
-    def __hash__(self):\r
-        return hash(self.DescFilePath)\r
-\r
-## PlatformBuildClassObject\r
-#\r
-# This Class defines PlatformBuildClass\r
-# \r
-# @param object:          Inherited from object class\r
-#\r
-# @var DescFilePath:      To store value for DescFilePath\r
-# @var PlatformName:      To store value for PlatformName\r
-# @var Guid:              To store value for Guid\r
-# @var Version:           To store value for Version\r
-# @var DscSpecification:  To store value for DscSpecification\r
-# @var OutputDirectory:   To store value for OutputDirectory\r
-# @var FlashDefinition:   To store value for FlashDefinition\r
-# @var BuildNumber:       To store value for BuildNumber\r
-# @var MakefileName:      To store value for MakefileName\r
-# @var SkuIds:            To store value for SkuIds, it is a set structure as\r
-#                         { 'SkuName' : SkuId, '!include' : includefilename, ...}\r
-# @var Modules:           To store value for Modules, it is a list structure as\r
-#                         [ InfFileName, ... ]\r
-# @var Libraries:         To store value for Libraries, it is a list structure as\r
-#                         [ InfFileName, ... ]\r
-# @var LibraryClasses:    To store value for LibraryClasses, it is a set structure as\r
-#                         { (LibraryClassName, ModuleType) : LibraryClassInfFile }\r
-# @var Pcds:              To store value for Pcds, it is a set structure as\r
-#                         { [(PcdCName, PcdGuidCName)] : PcdClassObject }\r
-# @var BuildOptions:      To store value for BuildOptions, it is a set structure as\r
-#                         { [BuildOptionKey] : BuildOptionValue }\r
-#\r
-class PlatformBuildClassObject(object):\r
-    def __init__(self):\r
-        self.DescFilePath            = ''\r
-        self.PlatformName            = ''\r
-        self.Guid                    = ''\r
-        self.Version                 = ''\r
-        self.DscSpecification        = ''\r
-        self.OutputDirectory         = ''\r
-        self.FlashDefinition         = ''\r
-        self.BuildNumber             = ''\r
-        self.MakefileName            = ''\r
-\r
-        self.SkuIds                  = {}\r
-        self.Modules                 = []\r
-        self.LibraryInstances        = []\r
-        self.LibraryClasses          = {}\r
-        self.Libraries               = {}\r
-        self.Pcds                    = {}\r
-        self.BuildOptions            = {}\r
-\r
-    ## Convert the class to a string\r
-    #\r
-    #  Convert member DescFilePath of the class to a string\r
-    #\r
-    #  @retval string Formatted String\r
-    #\r
-    def __str__(self):\r
-        return self.DescFilePath\r
-\r
-    ## Override __eq__ function\r
-    #\r
-    # Check whether PlatformBuildClassObjects are the same\r
-    #\r
-    # @retval False The two PlatformBuildClassObjects are different\r
-    # @retval True  The two PlatformBuildClassObjects are the same\r
-    #\r
-    def __eq__(self, other):\r
-        return self.DescFilePath == str(other)\r
-\r
-    ## Override __hash__ function\r
-    #\r
-    # Use DescFilePath as key in hash table\r
-    #\r
-    # @retval string Key for hash table\r
-    #\r
-    def __hash__(self):\r
-        return hash(self.DescFilePath)\r
-\r
-## ItemBuild\r
-#\r
-# This Class defines Module/Platform/Package databases for build system\r
-#\r
-# @param object:          Inherited from object class\r
-# @param Arch:            Build arch\r
-# @param Platform:        Build Platform\r
-# @param Package:         Build Package\r
-# @param Module:          Build Module\r
-#\r
-# @var Arch:              To store value for Build Arch\r
-# @var PlatformDatabase:  To store value for PlatformDatabase, it is a set structure as\r
-#                         { [DscFileName] : PlatformBuildClassObject, ...}\r
-# @var PackageDatabase:   To store value for PackageDatabase, it is a set structure as\r
-#                         { [DecFileName] : PacakgeBuildClassObject, ...}\r
-# @var ModuleDatabase:    To store value for ModuleDatabase, it is a list structure as\r
-#                         { [InfFileName] : ModuleBuildClassObject, ...}\r
-#\r
-class ItemBuild(object):\r
-    def __init__(self, Arch, Platform = None, Package = None, Module = None):\r
-        self.Arch                    = Arch\r
-        self.PlatformDatabase        = {}\r
-        self.PackageDatabase         = {}\r
-        self.ModuleDatabase          = {}\r
-\r
-## WorkspaceBuild\r
-#\r
-# This class is used to parse active platform to init all inf/dec/dsc files\r
-# Generate module/package/platform databases for build\r
-#\r
-# @param object:          Inherited from object class\r
-# @param ActivePlatform:  Input value for current active platform\r
-# @param WorkspaceDir:    Input value for current WorkspaceDir\r
-#\r
-# @var WorkspaceDir:      To store value for WorkspaceDir\r
-# @var SupArchList:       To store value for SupArchList, selection scope is in below list\r
-#                         EBC | IA32 | X64 | IPF | ARM | PPC | AARCH64\r
-# @var BuildTarget:       To store value for WorkspaceDir, selection scope is in below list\r
-#                         RELEASE | DEBUG\r
-# @var SkuId:             To store value for SkuId\r
-# @var Fdf:               To store value for Fdf\r
-# @var FdTargetList:      To store value for FdTargetList\r
-# @var FvTargetList:      To store value for FvTargetList\r
-# @var TargetTxt:         To store value for TargetTxt, it is a set structure as\r
-#                         TargetTxtClassObject\r
-# @var ToolDef:           To store value for ToolDef, it is a set structure as\r
-#                         ToolDefClassObject\r
-# @var InfDatabase:       To store value for InfDatabase, it is a set structure as\r
-#                         { [InfFileName] : InfClassObject}\r
-# @var DecDatabase:       To store value for DecDatabase, it is a set structure as\r
-#                         { [DecFileName] : DecClassObject}\r
-# @var DscDatabase:       To store value for DscDatabase, it is a set structure as\r
-#                         { [DscFileName] : DscClassObject}\r
-# @var Build:             To store value for DscDatabase, it is a set structure as\r
-#                         ItemBuild\r
-# @var DscFileName:       To store value for Active Platform\r
-# @var UnFoundPcdInDsc:   To store values for the pcds defined in INF/DEC but not found in DSC, it is a set structure as\r
-#                         { (PcdGuid, PcdCName, Arch) : DecFileName }\r
-#\r
-class WorkspaceBuild(object):\r
-    def __init__(self, ActivePlatform, WorkspaceDir):\r
-        self.WorkspaceDir            = NormPath(WorkspaceDir)\r
-        self.SupArchList             = []\r
-        self.BuildTarget             = []\r
-        self.SkuId                   = ''\r
-        self.Fdf                     = ''\r
-        self.FdTargetList            = []\r
-        self.FvTargetList            = []\r
-        self.TargetTxt               = None\r
-        self.ToolDef                 = None\r
-\r
-        self.InfDatabase             = {}\r
-        self.DecDatabase             = {}\r
-        self.DscDatabase             = {}\r
-        \r
-        self.UnFoundPcdInDsc         = {}\r
-\r
-        #\r
-        # Init build for all arches\r
-        #\r
-        self.Build                   = {}\r
-        for Arch in DataType.ARCH_LIST:\r
-            self.Build[Arch] = ItemBuild(Arch)\r
-\r
-        #\r
-        # Init build database\r
-        #\r
-        self.Db = Database.Database(DATABASE_PATH)\r
-        self.Db.InitDatabase()\r
-        \r
-        #\r
-        # Get active platform\r
-        #\r
-        self.DscFileName = NormPath(ActivePlatform)\r
-        File = self.WorkspaceFile(self.DscFileName)\r
-        if os.path.exists(File) and os.path.isfile(File):\r
-            self.DscDatabase[self.DscFileName] = Dsc(File, False, True, self.WorkspaceDir, self.Db)\r
-        else:\r
-            EdkLogger.error("AutoGen", FILE_NOT_FOUND, ExtraData = File)\r
-\r
-        #\r
-        # Parse platform to get module\r
-        #\r
-        for DscFile in self.DscDatabase.keys():\r
-            Platform = self.DscDatabase[DscFile].Platform\r
-\r
-            #\r
-            # Get global information\r
-            #\r
-            Tmp = set()\r
-            for Arch in DataType.ARCH_LIST:\r
-                for Item in Platform.Header[Arch].SupArchList:\r
-                    Tmp.add(Item)\r
-            self.SupArchList = list(Tmp)\r
-            Tmp = set()\r
-            for Arch in DataType.ARCH_LIST:\r
-                for Item in Platform.Header[Arch].BuildTargets:\r
-                    Tmp.add(Item)\r
-            self.BuildTarget = list(Tmp)\r
-            for Arch in self.SupArchList:\r
-                self.SkuId = Platform.Header[Arch].SkuIdName\r
-            self.Fdf = Platform.FlashDefinitionFile.FilePath\r
-\r
-            #\r
-            # Get all inf files\r
-            #\r
-            for Item in Platform.LibraryClasses.LibraryList:\r
-                for Arch in Item.SupArchList:\r
-                    self.AddToInfDatabase(Item.FilePath)\r
-\r
-            for Item in Platform.Libraries.LibraryList:\r
-                for Arch in Item.SupArchList:\r
-                    self.AddToInfDatabase(Item.FilePath)\r
-\r
-            for Item in Platform.Modules.ModuleList:\r
-                for Arch in Item.SupArchList:\r
-                    #\r
-                    # Add modules\r
-                    #\r
-                    Module = Item.FilePath\r
-                    self.AddToInfDatabase(Module)\r
-                    #\r
-                    # Add library used in modules\r
-                    #\r
-                    for Lib in Item.LibraryClasses.LibraryList:\r
-                        self.AddToInfDatabase(Lib.FilePath)\r
-                        self.UpdateLibraryClassOfModule(Module, Lib.Name, Arch, Lib.FilePath)\r
-\r
-        #\r
-        # Parse module to get package\r
-        #\r
-        for InfFile in self.InfDatabase.keys():\r
-            Module = self.InfDatabase[InfFile].Module\r
-            #\r
-            # Get all dec\r
-            #\r
-            for Item in Module.PackageDependencies:\r
-                for Arch in Item.SupArchList:\r
-                    self.AddToDecDatabase(Item.FilePath)\r
-    # End of self.Init()\r
-\r
-    ## Generate PlatformDatabase\r
-    #\r
-    # Go through each arch to get all items in DscDatabase to PlatformDatabase\r
-    #\r
-    def GenPlatformDatabase(self, PcdsSet={}):\r
-        for Dsc in self.DscDatabase.keys():\r
-            Platform = self.DscDatabase[Dsc].Platform\r
-            for Arch in self.SupArchList:\r
-                Pb = PlatformBuildClassObject()\r
-\r
-                #\r
-                # Defines\r
-                #\r
-                Pb.DescFilePath = Dsc\r
-                Pb.PlatformName = Platform.Header[Arch].Name\r
-                if Pb.PlatformName == '':\r
-                    EdkLogger.error("AutoGen", PARSER_ERROR, "The BaseName of platform %s is not defined for arch %s" % (Dsc, Arch))\r
-                Pb.Guid = Platform.Header[Arch].Guid\r
-                Pb.Version = Platform.Header[Arch].Version\r
-                Pb.DscSpecification = Platform.Header[Arch].DscSpecification\r
-                Pb.OutputDirectory = Platform.Header[Arch].OutputDirectory\r
-                Pb.FlashDefinition = Platform.FlashDefinitionFile.FilePath\r
-                Pb.BuildNumber = Platform.Header[Arch].BuildNumber\r
-\r
-                #\r
-                # SkuId\r
-                #\r
-                for Key in Platform.SkuInfos.SkuInfoList.keys():\r
-                    Pb.SkuIds[Key] = Platform.SkuInfos.SkuInfoList[Key]\r
-\r
-                #\r
-                # Module\r
-                #\r
-                for Item in Platform.Modules.ModuleList:\r
-                    if Arch in Item.SupArchList:\r
-                        Pb.Modules.append(Item.FilePath)\r
-\r
-                #\r
-                # BuildOptions\r
-                #\r
-                for Item in Platform.BuildOptions.BuildOptionList:\r
-                    if Arch in Item.SupArchList:\r
-                        Pb.BuildOptions[(Item.ToolChainFamily, Item.ToolChain)] = Item.Option\r
-\r
-                #\r
-                # LibraryClass\r
-                #\r
-                for Item in Platform.LibraryClasses.LibraryList:\r
-                    SupModuleList = self.FindSupModuleListOfLibraryClass(Item, Platform.LibraryClasses.LibraryList, Arch)\r
-                    if Arch in Item.SupArchList:\r
-                        for ModuleType in SupModuleList:\r
-                            Pb.LibraryClasses[(Item.Name, ModuleType)] = Item.FilePath\r
-\r
-                #\r
-                # Libraries\r
-                # \r
-                for Item in Platform.Libraries.LibraryList:\r
-                    for ItemArch in Item.SupArchList:\r
-                        Library = self.InfDatabase[Item.FilePath]\r
-                        if ItemArch not in Library.Module.Header:\r
-                            continue\r
-                        Pb.Libraries[Library.Module.Header[ItemArch].Name] = Item.FilePath\r
-                \r
-                #\r
-                # Pcds\r
-                #\r
-                for Item in Platform.DynamicPcdBuildDefinitions:\r
-                    if Arch in Item.SupArchList:\r
-                        Name = Item.CName\r
-                        Guid = Item.TokenSpaceGuidCName\r
-                        Type = Item.ItemType\r
-                        DatumType = Item.DatumType\r
-                        Value = Item.DefaultValue\r
-                        Token = Item.Token\r
-                        MaxDatumSize = Item.MaxDatumSize\r
-                        SkuInfoList = Item.SkuInfoList\r
-                        Pb.Pcds[(Name, Guid)] = PcdClassObject(Name, Guid, Type, DatumType, Value, Token, MaxDatumSize, SkuInfoList, False)\r
-\r
-                for (Name, Guid) in PcdsSet:\r
-                    Value = PcdsSet[Name, Guid]\r
-                    for PcdType in ["FixedAtBuild", "PatchableInModule", "FeatureFlag", "Dynamic", "DynamicEx"]:\r
-                        for Dec in self.Build[Arch].PackageDatabase:\r
-                            Pcds = self.Build[Arch].PackageDatabase[Dec].Pcds\r
-                            if (Name, Guid, PcdType) in Pcds:\r
-                                Pcd = Pcds[(Name, Guid, PcdType)]\r
-                                Type = PcdType\r
-                                DatumType = Pcd.DatumType\r
-                                Token = Pcd.TokenValue\r
-                                MaxDatumSize = Pcd.MaxDatumSize\r
-                                SkuInfoList = Pcd.SkuInfoList\r
-                                Pb.Pcds[(Name, Guid)] = PcdClassObject(Name, Guid, Type, DatumType, Value, Token, MaxDatumSize, SkuInfoList, False)\r
-                                break\r
-                        else:\r
-                            # nothing found\r
-                            continue\r
-                        # found in one package, find next PCD\r
-                        break\r
-                    else:\r
-                        EdkLogger.error("AutoGen", PARSER_ERROR, "PCD is not found in any package", ExtraData="%s.%s" % (Guid, Name))\r
-                #\r
-                # Add to database\r
-                #\r
-                self.Build[Arch].PlatformDatabase[Dsc] = Pb\r
-                Pb = None\r
-\r
-    ## Generate PackageDatabase\r
-    #\r
-    # Go through each arch to get all items in DecDatabase to PackageDatabase\r
-    #\r
-    def GenPackageDatabase(self):\r
-        for Dec in self.DecDatabase.keys():\r
-            Package = self.DecDatabase[Dec].Package\r
-\r
-            for Arch in self.SupArchList:\r
-                Pb = PackageBuildClassObject()\r
-\r
-                #\r
-                # Defines\r
-                #\r
-                Pb.DescFilePath = Dec\r
-                Pb.PackageName = Package.Header[Arch].Name\r
-                if Pb.PackageName == '':\r
-                    EdkLogger.error("AutoGen", PARSER_ERROR, "The BaseName of package %s is not defined for arch %s" % (Dec, Arch))\r
-\r
-                Pb.Guid = Package.Header[Arch].Guid\r
-                Pb.Version = Package.Header[Arch].Version\r
-\r
-                #\r
-                # Protocols\r
-                #\r
-                for Item in Package.ProtocolDeclarations:\r
-                    if Arch in Item.SupArchList:\r
-                        Pb.Protocols[Item.CName] = Item.Guid\r
-\r
-                #\r
-                # Ppis\r
-                #\r
-                for Item in Package.PpiDeclarations:\r
-                    if Arch in Item.SupArchList:\r
-                        Pb.Ppis[Item.CName] = Item.Guid\r
-\r
-                #\r
-                # Guids\r
-                #\r
-                for Item in Package.GuidDeclarations:\r
-                    if Arch in Item.SupArchList:\r
-                        Pb.Guids[Item.CName] = Item.Guid\r
-\r
-                #\r
-                # Includes\r
-                #\r
-                for Item in Package.Includes:\r
-                    if Arch in Item.SupArchList:\r
-                        Pb.Includes.append(Item.FilePath)\r
-\r
-                #\r
-                # LibraryClasses\r
-                #\r
-                for Item in Package.LibraryClassDeclarations:\r
-                    if Arch in Item.SupArchList:\r
-                        Pb.LibraryClasses[Item.LibraryClass] = Item.RecommendedInstance\r
-\r
-                #\r
-                # Pcds\r
-                #\r
-                for Item in Package.PcdDeclarations:\r
-                    if Arch in Item.SupArchList:\r
-                        Name = Item.CName\r
-                        Guid = Item.TokenSpaceGuidCName\r
-                        Type = Item.ItemType\r
-                        DatumType = Item.DatumType\r
-                        Value = Item.DefaultValue\r
-                        Token = Item.Token\r
-                        MaxDatumSize = Item.MaxDatumSize\r
-                        SkuInfoList = Item.SkuInfoList\r
-                        Pb.Pcds[(Name, Guid, Type)] = PcdClassObject(Name, Guid, Type, DatumType, Value, Token, MaxDatumSize, SkuInfoList, False)\r
-\r
-                #\r
-                # Add to database\r
-                #\r
-                self.Build[Arch].PackageDatabase[Dec] = Pb\r
-                Pb = None\r
-\r
-    ## Generate ModuleDatabase\r
-    #\r
-    # Go through each arch to get all items in InfDatabase to ModuleDatabase\r
-    #    \r
-    def GenModuleDatabase(self, InfList = []):\r
-        for Inf in self.InfDatabase.keys():\r
-            Module = self.InfDatabase[Inf].Module\r
-\r
-            for Arch in self.SupArchList:\r
-                if not self.IsModuleDefinedInPlatform(Inf, Arch, InfList) or Arch not in Module.Header:\r
-                    continue\r
-\r
-                ModuleHeader = Module.Header[Arch]\r
-                Pb = ModuleBuildClassObject()\r
-\r
-                #\r
-                # Defines\r
-                #\r
-                Pb.DescFilePath = Inf\r
-                Pb.BaseName = ModuleHeader.Name\r
-                if Pb.BaseName == '':\r
-                    EdkLogger.error("AutoGen", PARSER_ERROR, "The BaseName of module %s is not defined for arch %s" % (Inf, Arch))                \r
-                Pb.Guid = ModuleHeader.Guid\r
-                Pb.Version = ModuleHeader.Version\r
-                Pb.ModuleType = ModuleHeader.ModuleType\r
-                Pb.PcdIsDriver = ModuleHeader.PcdIsDriver\r
-                Pb.BinaryModule = ModuleHeader.BinaryModule\r
-                Pb.CustomMakefile = ModuleHeader.CustomMakefile\r
-                Pb.Shadow = ModuleHeader.Shadow\r
-\r
-                #\r
-                # Specs os Defines\r
-                #\r
-                Pb.Specification = ModuleHeader.Specification\r
-                Pb.Specification[TAB_INF_DEFINES_EDK_RELEASE_VERSION] = ModuleHeader.EdkReleaseVersion\r
-                Pb.Specification[TAB_INF_DEFINES_EFI_SPECIFICATION_VERSION] = ModuleHeader.UefiSpecificationVersion\r
-                Pb.Specification[TAB_INF_DEFINES_UEFI_SPECIFICATION_VERSION] = ModuleHeader.UefiSpecificationVersion\r
-                Pb.AutoGenVersion = int(ModuleHeader.InfVersion, 0)\r
-\r
-                #\r
-                # LibraryClass of Defines\r
-                #\r
-                for Item in ModuleHeader.LibraryClass:\r
-                    Pb.LibraryClass.append(LibraryClassObject(Item.LibraryClass, Item.SupModuleList, None))\r
-\r
-                #\r
-                # Module image and library of Defines\r
-                #\r
-                for Item in Module.ExternImages:\r
-                    if Item.ModuleEntryPoint != '' and Item.ModuleEntryPoint not in Pb.ModuleEntryPointList:\r
-                        Pb.ModuleEntryPointList.append(Item.ModuleEntryPoint)\r
-                    if Item.ModuleUnloadImage != '' and Item.ModuleUnloadImage not in Pb.ModuleUnloadImageList:\r
-                        Pb.ModuleUnloadImageList.append(Item.ModuleUnloadImage)\r
-                for Item in Module.ExternLibraries:\r
-                    if Item.Constructor != '' and Item.Constructor not in Pb.ConstructorList:\r
-                        Pb.ConstructorList.append(Item.Constructor)\r
-                    if Item.Destructor != '' and Item.Destructor not in Pb.DestructorList:\r
-                        Pb.DestructorList.append(Item.Destructor)\r
-\r
-                #\r
-                # Binaries\r
-                #\r
-                for Item in Module.Binaries:\r
-                    if Arch in Item.SupArchList:\r
-                        FileName = Item.BinaryFile\r
-                        FileType = Item.FileType\r
-                        Target = Item.Target\r
-                        FeatureFlag = Item.FeatureFlag\r
-                        Pb.Binaries.append(ModuleBinaryFileClass(FileName, FileType, Target, FeatureFlag, Arch.split()))\r
-\r
-                #\r
-                # Sources\r
-                #\r
-                for Item in Module.Sources:\r
-                    if Arch in Item.SupArchList:\r
-                        SourceFile = Item.SourceFile\r
-                        TagName = Item.TagName\r
-                        ToolCode = Item.ToolCode\r
-                        ToolChainFamily = Item.ToolChainFamily\r
-                        FeatureFlag = Item.FeatureFlag\r
-                        Pb.Sources.append(ModuleSourceFileClass(SourceFile, TagName, ToolCode, ToolChainFamily, FeatureFlag))\r
-\r
-                #\r
-                # Protocols\r
-                #\r
-                for Item in Module.Protocols:\r
-                    if Arch in Item.SupArchList:\r
-                        Pb.Protocols.append(Item.CName)\r
-\r
-                #\r
-                # Ppis\r
-                #\r
-                for Item in Module.Ppis:\r
-                    if Arch in Item.SupArchList:\r
-                        Pb.Ppis.append(Item.CName)\r
-\r
-                #\r
-                # Guids\r
-                #\r
-                for Item in Module.Guids:\r
-                    if Arch in Item.SupArchList:\r
-                        Pb.Ppis.append(Item.CName)\r
-\r
-                #\r
-                # Includes\r
-                #\r
-                for Item in Module.Includes:\r
-                    if Arch in Item.SupArchList:\r
-                        Pb.Includes.append(Item.FilePath)\r
-\r
-                #\r
-                # Packages\r
-                #\r
-                for Item in Module.PackageDependencies:\r
-                    if Arch in Item.SupArchList:\r
-                        Pb.Packages.append(Item.FilePath)\r
-\r
-                #\r
-                # BuildOptions\r
-                #\r
-                for Item in Module.BuildOptions:\r
-                    if Arch in Item.SupArchList:\r
-                        if (Item.ToolChainFamily, Item.ToolChain) not in Pb.BuildOptions:\r
-                            Pb.BuildOptions[(Item.ToolChainFamily, Item.ToolChain)] = Item.Option\r
-                        else:\r
-                            OptionString = Pb.BuildOptions[(Item.ToolChainFamily, Item.ToolChain)]\r
-                            Pb.BuildOptions[(Item.ToolChainFamily, Item.ToolChain)] = OptionString + " " + Item.Option\r
-                self.FindBuildOptions(Arch, Inf, Pb.BuildOptions)\r
-\r
-                #\r
-                # Depex\r
-                #\r
-                for Item in Module.Depex:\r
-                    if Arch in Item.SupArchList:\r
-                        Pb.Depex = Pb.Depex + Item.Depex + ' '\r
-                Pb.Depex = Pb.Depex.strip()\r
-\r
-                #\r
-                # LibraryClasses\r
-                #\r
-                for Item in Module.LibraryClasses:\r
-                    if Arch in Item.SupArchList:\r
-                        Lib = Item.LibraryClass\r
-                        RecommendedInstance = Item.RecommendedInstance\r
-                        if Pb.LibraryClass != []:\r
-                            #\r
-                            # For Library\r
-                            #\r
-                            for Libs in Pb.LibraryClass:\r
-                                for Type in Libs.SupModList:\r
-                                    Instance = self.FindLibraryClassInstanceOfLibrary(Lib, Arch, Type)\r
-                                    if Instance is None:\r
-                                        Instance = RecommendedInstance\r
-                                    Pb.LibraryClasses[(Lib, Type)] = Instance\r
-                        else:\r
-                            #\r
-                            # For Module\r
-                            #\r
-                            Instance = self.FindLibraryClassInstanceOfModule(Lib, Arch, Pb.ModuleType, Inf)\r
-                            if Instance is None:\r
-                                Instance = RecommendedInstance\r
-                            Pb.LibraryClasses[(Lib, Pb.ModuleType)] = Instance\r
-\r
-                #\r
-                # Libraries\r
-                #\r
-                for Item in Module.Libraries:\r
-                    if Arch in Item.SupArchList:\r
-                        Pb.Libraries.append(Item.Library)\r
-\r
-                #\r
-                # Pcds\r
-                #\r
-                for Item in Module.PcdCodes:\r
-                    if Arch in Item.SupArchList:\r
-                        Name = Item.CName\r
-                        Guid = Item.TokenSpaceGuidCName\r
-                        Type = Item.ItemType\r
-                        Pb.Pcds[(Name, Guid)] = self.FindPcd(Arch, Inf, Name, Guid, Type)\r
-\r
-                #\r
-                # Add to database\r
-                #\r
-                self.Build[Arch].ModuleDatabase[Inf] = Pb\r
-                Pb = None\r
-\r
-    ## Update Libraries Of Platform Database\r
-    #\r
-    # @param InfList: A list for all inf files\r
-    #\r
-    def UpdateLibrariesOfPlatform(self, InfList = []):\r
-        for Arch in self.SupArchList:\r
-            PlatformDatabase = self.Build[Arch].PlatformDatabase\r
-            for Dsc in PlatformDatabase:\r
-                Platform = PlatformDatabase[Dsc]\r
-                for Inf in Platform.Modules:\r
-                    if not self.IsModuleDefinedInPlatform(Inf, Arch, InfList):\r
-                        continue\r
-                    Module = self.Build[Arch].ModuleDatabase[Inf]\r
-                    if Module.LibraryClass is None or Module.LibraryClass == []:\r
-                        self.UpdateLibrariesOfModule(Platform, Module, Arch)\r
-                        for Key in Module.LibraryClasses:\r
-                            Lib = Module.LibraryClasses[Key]\r
-                            if Lib not in Platform.LibraryInstances:\r
-                                Platform.LibraryInstances.append(Lib)\r
-\r
-\r
-    ## Update Libraries Of Module Database\r
-    #\r
-    # @param Module:  The module need to be updated libraries\r
-    # @param Arch:    The supportted arch of the module\r
-    #\r
-    def UpdateLibrariesOfModule(self, Platform, Module, Arch):\r
-        ModuleDatabase = self.Build[Arch].ModuleDatabase\r
-        ModuleType = Module.ModuleType\r
-\r
-        # check Edk module\r
-        if Module.AutoGenVersion < 0x00010005:\r
-            EdkLogger.verbose("")\r
-            EdkLogger.verbose("Library instances of module [%s] [%s]:" % (str(Module), Arch))\r
-            LibraryConsumerList = [Module]\r
-\r
-            # "CompilerStub" is a must for Edk modules\r
-            Module.Libraries.append("CompilerStub")\r
-            while len(LibraryConsumerList) > 0:\r
-                M = LibraryConsumerList.pop()\r
-                for LibraryName in M.Libraries:\r
-                    if LibraryName not in Platform.Libraries:\r
-                        EdkLogger.warn("AutoGen", "Library [%s] is not found" % LibraryName,\r
-                                        ExtraData="\t%s [%s]" % (str(Module), Arch))\r
-                        continue\r
-    \r
-                    LibraryFile = Platform.Libraries[LibraryName]\r
-                    if (LibraryName, ModuleType) not in Module.LibraryClasses:\r
-                        Module.LibraryClasses[LibraryName, ModuleType] = LibraryFile\r
-                        LibraryConsumerList.append(ModuleDatabase[LibraryFile])\r
-                        EdkLogger.verbose("\t" + LibraryName + " : " + LibraryFile)\r
-            return\r
-\r
-        # EdkII module\r
-        LibraryConsumerList = [Module]\r
-        Constructor         = []\r
-        ConsumedByList      = OrderedDict()\r
-        LibraryInstance     = OrderedDict()\r
-\r
-        EdkLogger.verbose("")\r
-        EdkLogger.verbose("Library instances of module [%s] [%s]:" % (str(Module), Arch))\r
-        while len(LibraryConsumerList) > 0:\r
-            M = LibraryConsumerList.pop()\r
-            for Key, LibraryPath in M.LibraryClasses.iteritems():\r
-                # The "Key" is in format of (library_class_name, supported_module_type)\r
-                if ModuleType != "USER_DEFINED" and ModuleType not in Key:\r
-                    EdkLogger.debug(EdkLogger.DEBUG_3, "%s for module type %s is not supported (%s)" % (Key + (LibraryPath,)))\r
-                    continue\r
-\r
-                LibraryClassName = Key[0]\r
-                if LibraryClassName not in LibraryInstance or LibraryInstance[LibraryClassName] is None:\r
-                    if LibraryPath is None or LibraryPath == "":\r
-                        LibraryInstance[LibraryClassName] = None\r
-                        continue\r
-                    LibraryModule = ModuleDatabase[LibraryPath]\r
-                    LibraryInstance[LibraryClassName] = LibraryModule\r
-                    LibraryConsumerList.append(LibraryModule)\r
-                    EdkLogger.verbose("\t" + LibraryClassName + " : " + str(LibraryModule))\r
-                elif LibraryPath is None or LibraryPath == "":\r
-                    continue\r
-                else:\r
-                    LibraryModule = LibraryInstance[LibraryClassName]\r
-\r
-                if LibraryModule.ConstructorList != [] and LibraryModule not in Constructor:\r
-                    Constructor.append(LibraryModule)\r
-\r
-                if LibraryModule not in ConsumedByList:\r
-                    ConsumedByList[LibraryModule] = []\r
-                if M != Module:\r
-                    if M in ConsumedByList[LibraryModule]:\r
-                        continue\r
-                    ConsumedByList[LibraryModule].append(M)\r
-        #\r
-        # Initialize the sorted output list to the empty set\r
-        #\r
-        SortedLibraryList = []\r
-        #\r
-        # Q <- Set of all nodes with no incoming edges\r
-        #\r
-        LibraryList = [] #LibraryInstance.values()\r
-        Q = []\r
-        for LibraryClassName in LibraryInstance:\r
-            M = LibraryInstance[LibraryClassName]\r
-            if M is None:\r
-                EdkLogger.error("AutoGen", AUTOGEN_ERROR,\r
-                                "Library instance for library class [%s] is not found" % LibraryClassName,\r
-                                ExtraData="\t%s [%s]" % (str(Module), Arch))\r
-            LibraryList.append(M)\r
-            #\r
-            # check if there're duplicate library classes\r
-            #\r
-            for Lc in M.LibraryClass:\r
-                if Lc.SupModList is not None and ModuleType not in Lc.SupModList:\r
-                    EdkLogger.error("AutoGen", AUTOGEN_ERROR,\r
-                                    "Module type [%s] is not supported by library instance [%s]" % (ModuleType, str(M)),\r
-                                    ExtraData="\t%s" % str(Module))\r
-\r
-                if Lc.LibraryClass in LibraryInstance and str(M) != str(LibraryInstance[Lc.LibraryClass]):\r
-                    EdkLogger.error("AutoGen", AUTOGEN_ERROR,\r
-                                    "More than one library instance found for library class [%s] in module [%s]" % (Lc.LibraryClass, Module),\r
-                                    ExtraData="\t%s\n\t%s" % (LibraryInstance[Lc.LibraryClass], str(M))\r
-                                    )\r
-            if ConsumedByList[M] == []:\r
-                Q.insert(0, M)\r
-        #\r
-        # while Q is not empty do\r
-        #\r
-        while Q != []:\r
-            #\r
-            # remove node from Q\r
-            #\r
-            Node = Q.pop()\r
-            #\r
-            # output Node\r
-            #\r
-            SortedLibraryList.append(Node)\r
-            #\r
-            # for each node Item with an edge e from Node to Item do\r
-            #\r
-            for Item in LibraryList:\r
-                if Node not in ConsumedByList[Item]:\r
-                    continue\r
-                #\r
-                # remove edge e from the graph\r
-                #\r
-                ConsumedByList[Item].remove(Node)\r
-                #\r
-                # If Item has no other incoming edges then\r
-                #\r
-                if ConsumedByList[Item] == []:\r
-                    #\r
-                    # insert Item into Q\r
-                    #\r
-                    Q.insert(0, Item)\r
-\r
-            EdgeRemoved = True\r
-            while Q == [] and EdgeRemoved:\r
-                EdgeRemoved = False\r
-                #\r
-                # for each node Item with a Constructor\r
-                #\r
-                for Item in LibraryList:\r
-                    if Item in Constructor:\r
-                        #\r
-                        # for each Node without a constructor with an edge e from Item to Node\r
-                        #\r
-                        for Node in ConsumedByList[Item]:\r
-                            if Node not in Constructor:\r
-                                #\r
-                                # remove edge e from the graph\r
-                                #\r
-                                ConsumedByList[Item].remove(Node)\r
-                                EdgeRemoved = True\r
-                                if ConsumedByList[Item] == []:\r
-                                    #\r
-                                    # insert Item into Q\r
-                                    #\r
-                                    Q.insert(0, Item)\r
-                                    break\r
-                    if Q != []:\r
-                        break\r
-\r
-        #\r
-        # if any remaining node Item in the graph has a constructor and an incoming edge, then the graph has a cycle\r
-        #\r
-        for Item in LibraryList:\r
-            if ConsumedByList[Item] != [] and Item in Constructor and len(Constructor) > 1:\r
-                ErrorMessage = 'Library [%s] with constructors has a cycle' % str(Item)\r
-                EdkLogger.error("AutoGen", AUTOGEN_ERROR, ErrorMessage,\r
-                                "\tconsumed by " + "\n\tconsumed by ".join([str(L) for L in ConsumedByList[Item]]))\r
-            if Item not in SortedLibraryList:\r
-                SortedLibraryList.append(Item)\r
-\r
-        #\r
-        # Build the list of constructor and destructir names\r
-        # The DAG Topo sort produces the destructor order, so the list of constructors must generated in the reverse order\r
-        #\r
-        SortedLibraryList.reverse()\r
-        Module.LibraryClasses = OrderedDict()\r
-        for L in SortedLibraryList:\r
-            for Lc in L.LibraryClass:\r
-                Module.LibraryClasses[Lc.LibraryClass, ModuleType] = str(L)\r
-            #\r
-            # Merge PCDs from library instance\r
-            #\r
-            for Key in L.Pcds:\r
-                if Key not in Module.Pcds:\r
-                    LibPcd = L.Pcds[Key]\r
-                    Module.Pcds[Key] = self.FindPcd(Arch, str(Module), LibPcd.TokenCName, LibPcd.TokenSpaceGuidCName, LibPcd.Type)\r
-            #\r
-            # Merge GUIDs from library instance\r
-            #\r
-            for CName in L.Guids:\r
-                if CName not in Module.Guids:\r
-                    Module.Guids.append(CName)\r
-            #\r
-            # Merge Protocols from library instance\r
-            #\r
-            for CName in L.Protocols:\r
-                if CName not in Module.Protocols:\r
-                    Module.Protocols.append(CName)\r
-            #\r
-            # Merge Ppis from library instance\r
-            #\r
-            for CName in L.Ppis:\r
-                if CName not in Module.Ppis:\r
-                    Module.Ppis.append(CName)\r
-\r
-    ## GenBuildDatabase\r
-    #\r
-    # Generate build database for all arches\r
-    #\r
-    # @param PcdsSet: Pcd list for override from Fdf parse result\r
-    # @param InfList: Inf list for override from Fdf parse result\r
-    #\r
-    def GenBuildDatabase(self, PcdsSet = {}, InfList = []):\r
-        #\r
-        # Add additional inf file defined in Fdf file\r
-        #\r
-        for InfFile in InfList:\r
-            self.AddToInfDatabase(NormPath(InfFile))\r
-        \r
-        #\r
-        # Generate PlatformDatabase, PackageDatabase and ModuleDatabase\r
-        #\r
-        self.GenPackageDatabase()\r
-        self.GenPlatformDatabase(PcdsSet)\r
-        self.GenModuleDatabase(InfList)\r
-        \r
-        self.Db.Close()\r
-        \r
-        #\r
-        # Update Libraries Of Platform\r
-        #\r
-        self.UpdateLibrariesOfPlatform(InfList)\r
-        \r
-        #\r
-        # Output used Pcds not found in DSC file\r
-        #\r
-        self.ShowUnFoundPcds()\r
-\r
-    ## ShowUnFoundPcds()\r
-    #\r
-    # If there is any pcd used but not defined in DSC\r
-    # Print warning message on screen and output a list of pcds\r
-    #\r
-    def ShowUnFoundPcds(self):\r
-        if self.UnFoundPcdInDsc != {}:\r
-            WrnMessage = '**** WARNING ****\n'\r
-            WrnMessage += 'The following Pcds were not defined in the DSC file: %s\n' % self.DscFileName\r
-            WrnMessage += 'The default values were obtained from the DEC file that declares the PCD and the PCD default value\n'\r
-            for (Guid, Name, Type, Arch) in self.UnFoundPcdInDsc:\r
-                Dec = self.UnFoundPcdInDsc[(Guid, Name, Type, Arch)]\r
-                Pcds = self.Build[Arch].PackageDatabase[Dec].Pcds\r
-                if (Name, Guid, Type) in Pcds:\r
-                    Pcd = Pcds[(Name, Guid, Type)]\r
-                    PcdItemTypeUsed = Pcd.Type\r
-                    DefaultValue = Pcd.DefaultValue\r
-                    WrnMessage += '%s.%s: Defined in file %s, PcdItemType is Pcds%s, DefaultValue is %s\n' % (Guid, Name, Dec, PcdItemTypeUsed, DefaultValue)\r
-            EdkLogger.verbose(WrnMessage)\r
-        \r
-    ## Create a full path with workspace dir\r
-    #\r
-    # Convert Filename with workspace dir to create a full path\r
-    #\r
-    # @param Filename: The filename need to be added workspace dir\r
-    #\r
-    # @retval string Full path\r
-    #\r
-    def WorkspaceFile(self, Filename):\r
-        return WorkspaceFile(self.WorkspaceDir, Filename)\r
-\r
-    ## Update LibraryClass of Module\r
-    #\r
-    # If a module of a platform has its own override libraryclass but the libraryclass not defined in the module\r
-    # Add this libraryclass to the module\r
-    #\r
-    # @param InfFileName:       InfFileName specificed in platform\r
-    # @param LibraryClass:      LibraryClass specificed in platform\r
-    # @param Arch:              Supportted Arch\r
-    # @param InstanceFilePath:  InstanceFilePath specificed in platform\r
-    #\r
-    def UpdateLibraryClassOfModule(self, InfFileName, LibraryClass, Arch, InstanceFilePath):\r
-        #\r
-        # Update the library instance itself to add this libraryclass name\r
-        #\r
-        LibraryModule = self.InfDatabase[InstanceFilePath].Module\r
-        LibList = LibraryModule.Header[Arch].LibraryClass\r
-        NotFound = True\r
-        for Lib in LibList:\r
-            #\r
-            # Find this LibraryClass\r
-            #\r
-            if Lib.LibraryClass == LibraryClass:\r
-                NotFound = False;\r
-                break;\r
-        if NotFound:\r
-            NewLib = LibraryClassClass()\r
-            NewLib.LibraryClass = LibraryClass\r
-            NewLib.SupModuleList = DataType.SUP_MODULE_LIST # LibraryModule.Header[Arch].ModuleType.split()\r
-            LibraryModule.Header[Arch].LibraryClass.append(NewLib)\r
-\r
-        #\r
-        # Add it to LibraryClasses Section for the module which is using the library\r
-        #\r
-        Module = self.InfDatabase[InfFileName].Module\r
-        LibList = Module.LibraryClasses\r
-        NotFound = True\r
-        for Lib in LibList:\r
-            #\r
-            # Find this LibraryClass\r
-            #\r
-            if Lib.LibraryClass == LibraryClass:\r
-                if Arch in Lib.SupArchList:\r
-                    return\r
-                else:\r
-                    Lib.SupArchList.append(Arch)\r
-                    return\r
-        if NotFound:\r
-            Lib = LibraryClassClass()\r
-            Lib.LibraryClass = LibraryClass\r
-            Lib.SupArchList = [Arch]\r
-            Module.LibraryClasses.append(Lib)\r
-\r
-    ## Add Inf file to InfDatabase\r
-    #\r
-    # Create a Inf instance for input inf file and add it to InfDatabase\r
-    #\r
-    # @param InfFileName: The InfFileName need to be added to database\r
-    #\r
-    def AddToInfDatabase(self, InfFileName):\r
-        File = self.WorkspaceFile(InfFileName)\r
-        if os.path.exists(File) and os.path.isfile(File):\r
-            if InfFileName not in self.InfDatabase:\r
-                self.InfDatabase[InfFileName] = Inf(File, False, True, self.WorkspaceDir, self.Db, self.SupArchList)\r
-        else:\r
-            EdkLogger.error("AutoGen", FILE_NOT_FOUND, ExtraData=File)\r
-\r
-    ## Add Dec file to DecDatabase\r
-    #\r
-    # Create a Dec instance for input dec file and add it to DecDatabase\r
-    #\r
-    # @param DecFileName: The DecFileName need to be added to database\r
-    #\r
-    def AddToDecDatabase(self, DecFileName):\r
-        File = self.WorkspaceFile(DecFileName)\r
-        if os.path.exists(File) and os.path.isfile(File):\r
-            if DecFileName not in self.DecDatabase:\r
-                self.DecDatabase[DecFileName] = Dec(File, False, True, self.WorkspaceDir, self.Db, self.SupArchList)\r
-        else:\r
-            EdkLogger.error("AutoGen", FILE_NOT_FOUND, ExtraData=File)\r
-\r
-    ## Search LibraryClass Instance for Module\r
-    #\r
-    # Search PlatformBuildDatabase to find LibraryClass Instance for Module\r
-    # Return the instance if found\r
-    #\r
-    # @param Lib:         Input value for Library Class Name\r
-    # @param Arch:        Supportted Arch\r
-    # @param ModuleType:  Supportted ModuleType\r
-    # @param ModuleName:  Input value for Module Name\r
-    #\r
-    # @retval string Found LibraryClass Instance file path\r
-    #\r
-    def FindLibraryClassInstanceOfModule(self, Lib, Arch, ModuleType, ModuleName):\r
-        #\r
-        # First find if exist in <LibraryClass> of <Components> from dsc file\r
-        #\r
-        for Dsc in self.DscDatabase.keys():\r
-            Platform = self.DscDatabase[Dsc].Platform\r
-            for Module in Platform.Modules.ModuleList:\r
-                if Arch in Module.SupArchList:\r
-                    if Module.FilePath == ModuleName:\r
-                        for LibraryClass in Module.LibraryClasses.LibraryList:\r
-                            if LibraryClass.Name == Lib:\r
-                                return LibraryClass.FilePath\r
-        #\r
-        #Second find if exist in <LibraryClass> of <LibraryClasses> from dsc file\r
-        #\r
-        return self.FindLibraryClassInstanceOfLibrary(Lib, Arch, ModuleType)\r
-\r
-    ## Search LibraryClass Instance for Library\r
-    #\r
-    # Search PlatformBuildDatabase to find LibraryClass Instance for Library\r
-    # Return the instance if found\r
-    #\r
-    # @param Lib:   Input value for Library Class Name\r
-    # @param Arch:  Supportted Arch\r
-    # @param Type:  Supportted Library Usage Type\r
-    #\r
-    # @retval string Found LibraryClass Instance file path\r
-    # @retval None   Not Found\r
-    #\r
-    def FindLibraryClassInstanceOfLibrary(self, Lib, Arch, Type):\r
-        for Dsc in self.DscDatabase.keys():\r
-            Platform  = self.DscDatabase[Dsc].Platform\r
-            if (Lib, Type) in self.Build[Arch].PlatformDatabase[Dsc].LibraryClasses:\r
-                return self.Build[Arch].PlatformDatabase[Dsc].LibraryClasses[(Lib, Type)]\r
-            elif (Lib, '') in self.Build[Arch].PlatformDatabase[Dsc].LibraryClasses:\r
-                return self.Build[Arch].PlatformDatabase[Dsc].LibraryClasses[(Lib, '')]\r
-        return None\r
-\r
-    ## Find BuildOptions\r
-    #\r
-    # Search DscDatabase to find component definition of ModuleName\r
-    # Override BuildOption if it is defined in component\r
-    #\r
-    # @param Arch:          Supportted Arch\r
-    # @param ModuleName:    The module which has buildoption definition in component of platform\r
-    # @param BuildOptions:  The set of all buildopitons\r
-    #\r
-    def FindBuildOptions(self, Arch, ModuleName, BuildOptions):\r
-        for Dsc in self.DscDatabase.keys():\r
-            #\r
-            # First find if exist in <BuildOptions> of <Components> from dsc file\r
-            # if find, use that override the one defined in inf file\r
-            #\r
-            Platform = self.DscDatabase[Dsc].Platform\r
-            for Module in Platform.Modules.ModuleList:\r
-                if Arch in Module.SupArchList:\r
-                    if Module.FilePath == ModuleName:\r
-                        for BuildOption in Module.ModuleSaBuildOption.BuildOptionList:\r
-                            #\r
-                            # Add to BuildOptions\r
-                            #\r
-                            BuildOptions[(BuildOption.ToolChainFamily, BuildOption.ToolChain)] = BuildOption.Option\r
-\r
-    ## Find Pcd\r
-    #\r
-    # Search platform database, package database, module database and PcdsSet from Fdf\r
-    # Return found Pcd\r
-    #\r
-    # @param Arch:        Supportted Arch\r
-    # @param ModuleName:  The module which has pcd definition in component of platform\r
-    # @param Name:        Name of Pcd\r
-    # @param Guid:        Guid of Pcd\r
-    # @param Type:        Type of Pcd\r
-    #\r
-    # @retval PcdClassObject An instance for PcdClassObject with all members filled\r
-    #\r
-    def FindPcd(self, Arch, ModuleName, Name, Guid, Type):\r
-        NewType = ''\r
-        DatumType = ''\r
-        Value = ''\r
-        Token = ''\r
-        MaxDatumSize = ''\r
-        SkuInfoList = {}\r
-        IsOverrided = False\r
-        IsFoundInDsc = False\r
-        IsFoundInDec = False\r
-        FoundInDecFile = ''\r
-        \r
-        #\r
-        # Second get information from platform database\r
-        #\r
-        OwnerPlatform = ''\r
-        for Dsc in self.Build[Arch].PlatformDatabase.keys():\r
-            Pcds = self.Build[Arch].PlatformDatabase[Dsc].Pcds\r
-            if (Name, Guid) in Pcds:\r
-                OwnerPlatform = Dsc\r
-                Pcd = Pcds[(Name, Guid)]\r
-                if Pcd.Type != '' and Pcd.Type is not None:\r
-                    NewType = Pcd.Type\r
-                    if NewType in DataType.PCD_DYNAMIC_TYPE_LIST:\r
-                        NewType = DataType.TAB_PCDS_DYNAMIC\r
-                    elif NewType in DataType.PCD_DYNAMIC_EX_TYPE_LIST:\r
-                        NewType = DataType.TAB_PCDS_DYNAMIC_EX\r
-                else:\r
-                    NewType = Type\r
-\r
-                if Type != '' and Type != NewType:\r
-                    ErrorMsg = "PCD %s.%s is declared as [%s] in module\n\t%s\n\n"\\r
-                               "    But it's used as [%s] in platform\n\t%s"\\r
-                               % (Guid, Name, Type, ModuleName, NewType, OwnerPlatform)\r
-                    EdkLogger.error("AutoGen", PARSER_ERROR, ErrorMsg)\r
-\r
-\r
-                if Pcd.DatumType != '' and Pcd.DatumType is not None:\r
-                    DatumType = Pcd.DatumType\r
-                if Pcd.TokenValue != '' and Pcd.TokenValue is not None:\r
-                    Token = Pcd.TokenValue\r
-                if Pcd.DefaultValue != '' and Pcd.DefaultValue is not None:\r
-                    Value = Pcd.DefaultValue\r
-                if Pcd.MaxDatumSize != '' and Pcd.MaxDatumSize is not None:\r
-                    MaxDatumSize = Pcd.MaxDatumSize\r
-                SkuInfoList =  Pcd.SkuInfoList\r
-                \r
-                IsOverrided = True\r
-                IsFoundInDsc = True\r
-                break\r
-\r
-        #\r
-        # Third get information from <Pcd> of <Compontents> from module database\r
-        #\r
-        for Dsc in self.DscDatabase.keys():\r
-            for Module in self.DscDatabase[Dsc].Platform.Modules.ModuleList:\r
-                if Arch in Module.SupArchList:\r
-                    if Module.FilePath == ModuleName:\r
-                        for Pcd in Module.PcdBuildDefinitions:\r
-                            if (Name, Guid) == (Pcd.CName, Pcd.TokenSpaceGuidCName):\r
-                                if Pcd.DefaultValue != '':\r
-                                    Value = Pcd.DefaultValue\r
-                                if Pcd.MaxDatumSize != '':\r
-                                    MaxDatumSize = Pcd.MaxDatumSize\r
-                                    \r
-                                IsFoundInDsc = True\r
-                                IsOverrided = True\r
-                                break\r
-\r
-        #\r
-        # First get information from package database\r
-        #\r
-        Pcd = None\r
-        if NewType == '':\r
-            if Type != '':\r
-                PcdTypeList = [Type]\r
-            else:\r
-                PcdTypeList = ["FixedAtBuild", "PatchableInModule", "FeatureFlag", "Dynamic", "DynamicEx"]\r
-\r
-            for Dec in self.Build[Arch].PackageDatabase.keys():\r
-                Pcds = self.Build[Arch].PackageDatabase[Dec].Pcds\r
-                for PcdType in PcdTypeList:\r
-                    if (Name, Guid, PcdType) in Pcds:\r
-                        Pcd = Pcds[(Name, Guid, PcdType)]\r
-                        NewType = PcdType\r
-                        IsOverrided = True\r
-                        IsFoundInDec = True\r
-                        FoundInDecFile = Dec\r
-                        break\r
-                else:\r
-                    continue\r
-                break\r
-        else:\r
-            for Dec in self.Build[Arch].PackageDatabase.keys():\r
-                Pcds = self.Build[Arch].PackageDatabase[Dec].Pcds\r
-                if (Name, Guid, NewType) in Pcds:\r
-                    Pcd = Pcds[(Name, Guid, NewType)]\r
-                    IsOverrided = True\r
-                    IsFoundInDec = True\r
-                    FoundInDecFile = Dec\r
-                    break\r
-\r
-        if not IsFoundInDec:\r
-            ErrorMsg = "Pcd '%s.%s [%s]' defined in module '%s' is not found in any package for Arch '%s'" % (Guid, Name, NewType, ModuleName, Arch)\r
-            EdkLogger.error("AutoGen", PARSER_ERROR, ErrorMsg)\r
-\r
-        #\r
-        # Not found in any platform and fdf\r
-        #\r
-        if not IsFoundInDsc:\r
-            Value = Pcd.DefaultValue\r
-            if NewType.startswith("Dynamic") and SkuInfoList == {}:\r
-                SkuIds = self.Build[Arch].PlatformDatabase.values()[0].SkuIds\r
-                SkuInfoList['DEFAULT'] = SkuInfoClass(SkuIdName='DEFAULT', SkuId=SkuIds['DEFAULT'], DefaultValue=Value)\r
-            self.UnFoundPcdInDsc[(Guid, Name, NewType, Arch)] = FoundInDecFile\r
-        #elif Type != '' and NewType.startswith("Dynamic"):\r
-        #    NewType = Pcd.Type\r
-        DatumType = Pcd.DatumType\r
-        if Token in [None, '']:\r
-            Token = Pcd.TokenValue\r
-        if DatumType == "VOID*" and MaxDatumSize in ['', None]:\r
-            EdkLogger.verbose("No MaxDatumSize specified for PCD %s.%s in module [%s]" % (Guid, Name, ModuleName))\r
-            if Value[0] == 'L':\r
-                MaxDatumSize = str(len(Value) * 2)\r
-            elif Value[0] == '{':\r
-                MaxDatumSize = str(len(Value.split(',')))\r
-            else:\r
-                MaxDatumSize = str(len(Value))\r
-\r
-        return PcdClassObject(Name, Guid, NewType, DatumType, Value, Token, MaxDatumSize, SkuInfoList, IsOverrided)\r
-\r
-    ## Find Supportted Module List Of LibraryClass\r
-    #\r
-    # Search in InfDatabase, find the supmodulelist of the libraryclass\r
-    #\r
-    # @param LibraryClass:               LibraryClass name for search\r
-    # @param OverridedLibraryClassList:  A list of all LibraryClass\r
-    # @param Arch:                       Supportted Arch\r
-    #\r
-    # @retval list SupModuleList\r
-    #\r
-    def FindSupModuleListOfLibraryClass(self, LibraryClass, OverridedLibraryClassList, Arch):\r
-        Name = LibraryClass.Name\r
-        FilePath = LibraryClass.FilePath\r
-        SupModuleList = copy.copy(LibraryClass.SupModuleList)\r
-\r
-        #\r
-        # If the SupModuleList means all, remove overrided module types of platform\r
-        #\r
-        if SupModuleList == DataType.SUP_MODULE_LIST:\r
-            EdkLogger.debug(EdkLogger.DEBUG_3, "\tLibraryClass %s supports all module types" % Name)\r
-            for Item in OverridedLibraryClassList:\r
-                #\r
-                # Find a library class (Item) with the same name\r
-                #\r
-                if Item.Name == Name:\r
-                    #\r
-                    # Do nothing if it is itself\r
-                    #\r
-                    if Item.SupModuleList == DataType.SUP_MODULE_LIST:\r
-                        continue\r
-                    #\r
-                    # If not itself, check arch first\r
-                    #\r
-                    if Arch in LibraryClass.SupArchList:\r
-                        #\r
-                        # If arch is supportted, remove all related module type\r
-                        #\r
-                        if Arch in Item.SupArchList:\r
-                            for ModuleType in Item.SupModuleList:\r
-                                EdkLogger.debug(EdkLogger.DEBUG_3, "\tLibraryClass %s has specific defined module types" % Name)\r
-                                if ModuleType in SupModuleList:\r
-                                    SupModuleList.remove(ModuleType)\r
-\r
-        return SupModuleList\r
-\r
-    ## Find Module inf Platform\r
-    #\r
-    # Check if the module is defined in <Compentent> of <Platform>\r
-    #\r
-    # @param Inf:      Inf file (Module) need to be searched\r
-    # @param Arch:     Supportted Arch\r
-    # @param InfList:  A list for all Inf file\r
-    #\r
-    # @retval True     Mudule Found\r
-    # @retval Flase    Module Not Found\r
-    #\r
-    def IsModuleDefinedInPlatform(self, Inf, Arch, InfList):\r
-        for Dsc in self.DscDatabase.values():\r
-            for LibraryClass in Dsc.Platform.LibraryClasses.LibraryList:\r
-                if Inf == LibraryClass.FilePath and Arch in LibraryClass.SupArchList:\r
-                    return True\r
-            for Module in Dsc.Platform.Modules.ModuleList:\r
-                if Inf == Module.FilePath and Arch in Module.SupArchList:\r
-                    return True\r
-                for Item in Module.LibraryClasses.LibraryList:\r
-                    if Inf == Item.FilePath:\r
-                        return True\r
-            for Library in Dsc.Platform.Libraries.LibraryList:\r
-                if Inf == Library.FilePath and Arch in Library.SupArchList:\r
-                    return True\r
-\r
-        return False\r
-\r
-    ## Show all content of the workspacebuild\r
-    #\r
-    # Print each item of the workspacebuild with (Key = Value) pair\r
-    #\r
-    def ShowWorkspaceBuild(self):\r
-        print self.DscDatabase\r
-        print self.InfDatabase\r
-        print self.DecDatabase\r
-        print 'SupArchList', self.SupArchList\r
-        print 'BuildTarget', self.BuildTarget\r
-        print 'SkuId', self.SkuId\r
-\r
-        for Arch in self.SupArchList:\r
-            print Arch\r
-            print 'Platform'\r
-            for Platform in self.Build[Arch].PlatformDatabase.keys():\r
-                P = self.Build[Arch].PlatformDatabase[Platform]\r
-                print 'DescFilePath = ', P.DescFilePath\r
-                print 'PlatformName = ', P.PlatformName\r
-                print 'Guid = ', P.Guid\r
-                print 'Version = ', P.Version\r
-                print 'OutputDirectory = ', P.OutputDirectory\r
-                print 'FlashDefinition = ', P.FlashDefinition\r
-                print 'SkuIds = ', P.SkuIds\r
-                print 'Modules = ', P.Modules\r
-                print 'LibraryClasses = ', P.LibraryClasses\r
-                print 'Pcds = ', P.Pcds\r
-                for item in P.Pcds.keys():\r
-                    print P.Pcds[item]\r
-                print 'BuildOptions = ', P.BuildOptions\r
-                print ''\r
-            # End of Platform\r
-\r
-            print 'package'\r
-            for Package in self.Build[Arch].PackageDatabase.keys():\r
-                P = self.Build[Arch].PackageDatabase[Package]\r
-                print 'DescFilePath = ', P.DescFilePath\r
-                print 'PackageName = ', P.PackageName\r
-                print 'Guid = ', P.Guid\r
-                print 'Version = ', P.Version\r
-                print 'Protocols = ', P.Protocols\r
-                print 'Ppis = ', P.Ppis\r
-                print 'Guids = ', P.Guids\r
-                print 'Includes = ', P.Includes\r
-                print 'LibraryClasses = ', P.LibraryClasses\r
-                print 'Pcds = ', P.Pcds\r
-                for item in P.Pcds.keys():\r
-                    print P.Pcds[item]\r
-                print ''\r
-            # End of Package\r
-\r
-            print 'module'\r
-            for Module in self.Build[Arch].ModuleDatabase.keys():\r
-                P = self.Build[Arch].ModuleDatabase[Module]\r
-                print 'DescFilePath = ', P.DescFilePath\r
-                print 'BaseName = ', P.BaseName\r
-                print 'ModuleType = ', P.ModuleType\r
-                print 'Guid = ', P.Guid\r
-                print 'Version = ', P.Version\r
-                print 'CustomMakefile = ', P.CustomMakefile\r
-                print 'Specification = ', P.Specification\r
-                print 'Shadow = ', P.Shadow\r
-                print 'PcdIsDriver = ', P.PcdIsDriver\r
-                for Lib in P.LibraryClass:\r
-                    print 'LibraryClassDefinition = ', Lib.LibraryClass, 'SupModList = ', Lib.SupModList\r
-                print 'ModuleEntryPointList = ', P.ModuleEntryPointList\r
-                print 'ModuleUnloadImageList = ', P.ModuleUnloadImageList\r
-                print 'ConstructorList = ', P.ConstructorList\r
-                print 'DestructorList = ', P.DestructorList\r
-\r
-                print 'Binaries = '\r
-                for item in P.Binaries:\r
-                    print item.BinaryFile, item.FeatureFlag, item.SupArchList\r
-                print 'Sources = '\r
-                for item in P.Sources:\r
-                    print item.SourceFile\r
-                print 'LibraryClasses = ', P.LibraryClasses\r
-                print 'Protocols = ', P.Protocols\r
-                print 'Ppis = ', P.Ppis\r
-                print 'Guids = ', P.Guids\r
-                print 'Includes = ', P.Includes\r
-                print 'Packages = ', P.Packages\r
-                print 'Pcds = ', P.Pcds\r
-                for item in P.Pcds.keys():\r
-                    print P.Pcds[item]\r
-                print 'BuildOptions = ', P.BuildOptions\r
-                print 'Depex = ', P.Depex\r
-                print ''\r
-            # End of Module\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
-    print 'Start!', time.strftime('%H:%M:%S', time.localtime())\r
-    EdkLogger.Initialize()\r
-    EdkLogger.SetLevel(EdkLogger.QUIET)\r
-    \r
-    W = os.getenv('WORKSPACE')\r
-    Ewb = WorkspaceBuild('Nt32Pkg/Nt32Pkg.dsc', W)\r
-    Ewb.GenBuildDatabase({('PcdDevicePathSupportDevicePathFromText', 'gEfiMdeModulePkgTokenSpaceGuid') : 'KKKKKKKKKKKKKKKKKKKKK'}, ['Test.Inf'])\r
-    print 'Done!', time.strftime('%H:%M:%S', time.localtime())\r
-    Ewb.ShowWorkspaceBuild()\r
index d985187818aedd369755bff27808f0c250e61546..df3fc17bf3eb0eb0766f4eb833409b2faa639f85 100644 (file)
@@ -40,7 +40,6 @@ COMMON_PYTHON=$(BASE_TOOLS_PATH)\Source\Python\Common\BuildToolError.py \
               $(BASE_TOOLS_PATH)\Source\Python\Common\DecClassObject.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
               $(BASE_TOOLS_PATH)\Source\Python\Common\EdkLogger.py \\r
               $(BASE_TOOLS_PATH)\Source\Python\Common\Expression.py \\r
               $(BASE_TOOLS_PATH)\Source\Python\Common\FdfClassObject.py \\r