Update LibraryClass of ModuleDatabase from a single object to a list
authorhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 9 Aug 2007 03:21:24 +0000 (03:21 +0000)
committerhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 9 Aug 2007 03:21:24 +0000 (03:21 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@528 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/Common/EdkIIWorkspaceBuild.py

index 5b921f4..819b474 100644 (file)
@@ -468,15 +468,14 @@ class WorkspaceBuild(object):
                     if Arch in Item.SupArchList:\r
                         Lib = Item.LibraryClass\r
                         RecommendedInstance = Item.RecommendedInstance\r
-                        if pb.LibraryClass != None:\r
+                        if pb.LibraryClass != []:\r
                             # For Library\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
+                                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
@@ -508,7 +507,7 @@ class WorkspaceBuild(object):
                     if not self.IsModuleDefinedInPlatform(Inf, Arch):\r
                         continue\r
                     Module = self.Build[Arch].ModuleDatabase[NormPath(Inf)]\r
-                    if Module.LibraryClass == None or Module.LibraryClass == "":\r
+                    if Module.LibraryClass == None or Module.LibraryClass == []:\r
                         self.UpdateLibrariesOfModule(Module, Arch)\r
                         for Key in Module.LibraryClasses:\r
                             Lib = Module.LibraryClasses[Key]\r