git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@525 7335b...
authorhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Wed, 8 Aug 2007 11:17:44 +0000 (11:17 +0000)
committerhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Wed, 8 Aug 2007 11:17:44 +0000 (11:17 +0000)
Source/Python/Common/EdkIIWorkspaceBuild.py

index 886ede7..5b921f4 100644 (file)
@@ -79,7 +79,7 @@ class ModuleBuildClassObject(object):
         self.BinaryModule            = ''\r
         self.CustomMakefile          = {}\r
         self.Specification           = {}\r
-        self.LibraryClass            = None      # LibraryClassObject\r
+        self.LibraryClass            = []      # [ LibraryClassObject, ...]\r
         self.ModuleEntryPointList    = []\r
         self.ModuleUnloadImageList   = []\r
         self.ConstructorList         = []\r
@@ -393,7 +393,7 @@ class WorkspaceBuild(object):
                 \r
                 # LibraryClass of Defines\r
                 for Item in Module.Header.LibraryClass:\r
-                    pb.LibraryClass = LibraryClassObject(Item.LibraryClass, Item.SupModuleList, None)\r
+                    pb.LibraryClass.append(LibraryClassObject(Item.LibraryClass, Item.SupModuleList, None))\r
 \r
                 # Module image and library of Defines\r
                 for Item in Module.ExternImages:\r
@@ -470,11 +470,13 @@ class WorkspaceBuild(object):
                         RecommendedInstance = Item.RecommendedInstance\r
                         if pb.LibraryClass != None:\r
                             # For Library\r
-                            for Type in pb.LibraryClass.SupModList:\r
-                                Instance = self.FindLibraryClassInstanceOfLibrary(Lib, Arch, Type)\r
-                                if Instance == None:\r
-                                    Instance = RecommendedInstance\r
-                                pb.LibraryClasses[(Lib, Type)] = NormPath(Instance)\r
+                            for Libs in pb.LibraryClass:\r
+                                if Lib == Libs.LibraryClass:\r
+                                    for Type in Libs.SupModList:\r
+                                        Instance = self.FindLibraryClassInstanceOfLibrary(Lib, Arch, Type)\r
+                                        if Instance == None:\r
+                                            Instance = RecommendedInstance\r
+                                        pb.LibraryClasses[(Lib, Type)] = NormPath(Instance)\r
                         else:\r
                             # For Module\r
                             Instance = self.FindLibraryClassInstanceOfModule(Lib, Arch, pb.ModuleType, Inf) \r
@@ -937,8 +939,8 @@ class WorkspaceBuild(object):
                 print 'CustomMakefile = ', p.CustomMakefile\r
                 print 'Specification = ', p.Specification\r
                 print 'PcdIsDriver = ', p.PcdIsDriver\r
-                if p.LibraryClass != None:\r
-                    print 'LibraryClass = ', p.LibraryClass.LibraryClass, 'SupModList = ', p.LibraryClass.SupModList\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