git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@141 7335b...
authorhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 14 Jun 2007 08:30:14 +0000 (08:30 +0000)
committerhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 14 Jun 2007 08:30:14 +0000 (08:30 +0000)
Source/Python/EdkIIWorkspaceBuild.py
Source/Python/String.py

index 64fbb90..0387b07 100644 (file)
@@ -170,7 +170,12 @@ class WorkspaceBuild(object):
                     self.AddToInfDatabase(dscObj.Contents[key].LibraryClasses[index][0].split(DataType.TAB_VALUE_SPLIT, 1)[1])\r
                 for index in range(len(dscObj.Contents[key].Components)):\r
                     self.AddToInfDatabase(dscObj.Contents[key].Components[index][0])\r
-                \r
+                    if len(dscObj.Contents[key].Components[index][1]) > 0:\r
+                        LibList = dscObj.Contents[key].Components[index][1]\r
+                        for indexOfLib in range(len(LibList)):\r
+                            Lib = LibList[indexOfLib]\r
+                            if len(Lib.split(DataType.TAB_VALUE_SPLIT)) == 2:\r
+                                self.AddToInfDatabase(CleanString(Lib.split(DataType.TAB_VALUE_SPLIT)[1]))\r
         #End For of Dsc\r
         \r
         #parse module to get package\r
@@ -313,13 +318,14 @@ class WorkspaceBuild(object):
                     pb.Specification[TAB_INF_DEFINES_EDK_RELEASE_VERSION] = infObj.Defines.DefinesDictionary[TAB_INF_DEFINES_EDK_RELEASE_VERSION][0]\r
                 if infObj.Defines.DefinesDictionary[TAB_INF_DEFINES_EFI_SPECIFICATION_VERSION][0] != '':\r
                     pb.Specification[TAB_INF_DEFINES_EFI_SPECIFICATION_VERSION] = infObj.Defines.DefinesDictionary[TAB_INF_DEFINES_EFI_SPECIFICATION_VERSION][0]                \r
+                \r
                 LibraryClass = infObj.Defines.DefinesDictionary[TAB_INF_DEFINES_LIBRARY_CLASS][0]\r
                 if LibraryClass != '':\r
-                    l = LibraryClass.split(DataType.TAB_VALUE_SPLIT)\r
-                    if len(l) == 2:\r
-                        pb.LibraryClass = LibraryClassObject(l[0], l[1])\r
-                    elif len(l) == 1:\r
+                    l = LibraryClass.split(DataType.TAB_VALUE_SPLIT, 1)\r
+                    if len(l) == 1:\r
                         pb.LibraryClass = LibraryClassObject(l[0], DataType.SUP_MODULE_LIST_STRING)\r
+                    else:\r
+                        pb.LibraryClass = LibraryClassObject(l[0], l[1])\r
 \r
                 pb.ModuleEntryPointList.extend(infObj.Defines.DefinesDictionary[TAB_INF_DEFINES_ENTRY_POINT])\r
                 pb.ModuleUnloadImageList.extend(infObj.Defines.DefinesDictionary[TAB_INF_DEFINES_UNLOAD_IMAGE])\r
@@ -507,58 +513,61 @@ if __name__ == '__main__':
         print 'Platform'\r
         for platform in ewb.Build[arch].PlatformDatabase.keys():\r
             p = ewb.Build[arch].PlatformDatabase[platform]\r
-            print p.DescFilePath     \r
-            print p.PlatformName     \r
-            print p.Guid                     \r
-            print p.Version\r
-            print p.OutputDirectory                \r
-            print p.Modules                \r
-            print p.LibraryClasses \r
-            print p.Pcds                     \r
-            print p.BuildOptions     \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 'Modules = ', p.Modules                \r
+            print 'LibraryClasses = ', p.LibraryClasses \r
+            print 'Pcds = ', p.Pcds                     \r
+            print 'BuildOptions = ', p.BuildOptions\r
+            print ''   \r
         #End of Platform\r
     \r
         print 'package'\r
         for package in ewb.Build[arch].PackageDatabase.keys():\r
             p = ewb.Build[arch].PackageDatabase[package]\r
-            print p.DescFilePath    \r
-            print p.PackageName     \r
-            print p.Guid                    \r
-            print p.Version             \r
-            print p.Protocols         \r
-            print p.Ppis                    \r
-            print p.Guids                 \r
-            print p.Includes            \r
-            print p.LibraryClasses\r
-            print p.Pcds                    \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
+            print ''                    \r
         #End of Package\r
         \r
         print 'module'\r
         for module in ewb.Build[arch].ModuleDatabase.keys():\r
             p = ewb.Build[arch].ModuleDatabase[module]\r
-            print p.DescFilePath                    \r
-            print p.BaseName                         \r
-            print p.ModuleType                     \r
-            print p.Guid                                 \r
-            print p.Version\r
-            print p.Specification\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 'Specification = ', p.Specification\r
             if p.LibraryClass != None:\r
-                print p.LibraryClass.LibraryClass\r
-                print p.LibraryClass.SupModList\r
-            print p.ModuleEntryPointList \r
-            print p.ModuleUnloadImageList\r
-            print p.ConstructorList            \r
-            print p.DestructorList             \r
+                print 'LibraryClass = ', p.LibraryClass.LibraryClass\r
+                print 'SupModList = ', p.LibraryClass.SupModList\r
+            print 'ModuleEntryPointList = ', p.ModuleEntryPointList \r
+            print 'ModuleUnloadImageList = ', p.ModuleUnloadImageList\r
+            print 'ConstructorList = ', p.ConstructorList            \r
+            print 'DestructorList = ', p.DestructorList             \r
                                                                      \r
-            print p.Sources                            \r
-            print p.LibraryClasses             \r
-            print p.Protocols                        \r
-            print p.Ppis                                 \r
-            print p.Guids                                \r
-            print p.Includes                         \r
-            print p.Packages                         \r
-            print p.Pcds                                 \r
-            print p.BuildOptions\r
+            print 'Sources = ', p.Sources                            \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
+            print 'BuildOptions = ', p.BuildOptions\r
+            print ''\r
         #End of Module    \r
             \r
     #End of Arch List\r
index 11ce8d2..cbdc316 100644 (file)
@@ -215,10 +215,10 @@ def GetSingleValueOfKeyFromLines(Lines, Dictionary, CommentCharacter, KeySplitCh
                     Value = CleanString(LineList[1], CommentCharacter)\r
                 \r
                 if Key[0] not in Keys:\r
-                    Dictionary[Key[0]] = Value.split()\r
+                    Dictionary[Key[0]] = Value.splitlines()\r
                     Keys.append(Key[0])\r
                 else:\r
-                    Dictionary[Key[0]].extend(Value.split())                \r
+                    Dictionary[Key[0]].extend(Value.splitlines())                \r
     return True\r
 \r
 \r