git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@255 7335b...
authorhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Tue, 3 Jul 2007 07:27:24 +0000 (07:27 +0000)
committerhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Tue, 3 Jul 2007 07:27:24 +0000 (07:27 +0000)
Source/Python/EdkIIWorkspaceBuild.py

index e3ec21f..e017a59 100644 (file)
@@ -52,7 +52,17 @@ class PcdClassObject(object):
         self.DefaultValue = Value\r
         self.TokenValue = Token\r
         self.MaxDatumSize = MaxDatumSize\r
-\r
+        \r
+    def __str__(self):\r
+        rtn = str(self.TokenCName) + DataType.TAB_VALUE_SPLIT + \\r
+              str(self.TokenSpaceGuidCName) + DataType.TAB_VALUE_SPLIT + \\r
+              str(self.Type) + DataType.TAB_VALUE_SPLIT + \\r
+              str(self.DatumType) + DataType.TAB_VALUE_SPLIT + \\r
+              str(self.DefaultValue) + DataType.TAB_VALUE_SPLIT + \\r
+              str(self.TokenValue) + DataType.TAB_VALUE_SPLIT + \\r
+              str(self.MaxDatumSize)\r
+        return rtn\r
+              \r
 class LibraryClassObject(object):\r
     def __init__(self, Name = None, Type = None):\r
         self.LibraryClass = Name\r
@@ -241,19 +251,24 @@ class WorkspaceBuild(object):
                 #Pcds\r
                 for index in range(len(dscObj.Contents[key].PcdsFixedAtBuild)):\r
                     pcd = dscObj.Contents[key].PcdsFixedAtBuild[index].split(DataType.TAB_VALUE_SPLIT)\r
-                    pb.Pcds[(pcd[0], pcd[1])] = PcdClassObject(pcd[0], pcd[1], DataType.TAB_PCDS_FIXED_AT_BUILD, None, pcd[2], None, None)\r
+                    pcd.append(None)\r
+                    pb.Pcds[(pcd[0], pcd[1])] = PcdClassObject(pcd[0], pcd[1], DataType.TAB_PCDS_FIXED_AT_BUILD, None, pcd[2], None, pcd[3])\r
                 for index in range(len(dscObj.Contents[key].PcdsPatchableInModule)):\r
                     pcd = dscObj.Contents[key].PcdsPatchableInModule[index].split(DataType.TAB_VALUE_SPLIT)\r
-                    pb.Pcds[(pcd[0], pcd[1])] = PcdClassObject(pcd[0], pcd[1], DataType.TAB_PCDS_PATCHABLE_IN_MODULE, None, pcd[2], None, None)\r
+                    pcd.append(None)\r
+                    pb.Pcds[(pcd[0], pcd[1])] = PcdClassObject(pcd[0], pcd[1], DataType.TAB_PCDS_PATCHABLE_IN_MODULE, None, pcd[2], None, pcd[3])\r
                 for index in range(len(dscObj.Contents[key].PcdsFeatureFlag)):\r
                     pcd = dscObj.Contents[key].PcdsFeatureFlag[index].split(DataType.TAB_VALUE_SPLIT)\r
-                    pb.Pcds[(pcd[0], pcd[1])] = PcdClassObject(pcd[0], pcd[1], DataType.TAB_PCDS_FEATURE_FLAG, None, pcd[2], None, None)\r
+                    pcd.append(None)                    \r
+                    pb.Pcds[(pcd[0], pcd[1])] = PcdClassObject(pcd[0], pcd[1], DataType.TAB_PCDS_FEATURE_FLAG, None, pcd[2], None, pcd[3])\r
                 for index in range(len(dscObj.Contents[key].PcdsDynamic)):\r
                     pcd = dscObj.Contents[key].PcdsDynamic[index].split(DataType.TAB_VALUE_SPLIT)\r
-                    pb.Pcds[(pcd[0], pcd[1])] = PcdClassObject(pcd[0], pcd[1], DataType.TAB_PCDS_DYNAMIC, None, pcd[2], None, None)\r
+                    pcd.append(None)\r
+                    pb.Pcds[(pcd[0], pcd[1])] = PcdClassObject(pcd[0], pcd[1], DataType.TAB_PCDS_DYNAMIC, None, pcd[2], None, pcd[3])\r
                 for index in range(len(dscObj.Contents[key].PcdsDynamicEx)):\r
                     pcd = dscObj.Contents[key].PcdsDynamicEx[index].split(DataType.TAB_VALUE_SPLIT)\r
-                    pb.Pcds[(pcd[0], pcd[1])] = PcdClassObject(pcd[0], pcd[1], DataType.TAB_PCDS_DYNAMIC_EX, None, pcd[2], None, None)\r
+                    pcd.append(None)                    \r
+                    pb.Pcds[(pcd[0], pcd[1])] = PcdClassObject(pcd[0], pcd[1], DataType.TAB_PCDS_DYNAMIC_EX, None, pcd[2], None, pcd[3])\r
                 \r
                 self.Build[key].PlatformDatabase[dsc] = pb\r
                 pb = None    \r
@@ -571,9 +586,11 @@ if __name__ == '__main__':
             print 'Version = ', p.Version\r
             print 'OutputDirectory = ', p.OutputDirectory                \r
             print 'FlashDefinition = ', p.FlashDefinition\r
-            print 'Modules = ', p.Modules                \r
+            print 'Modules = ', p.Modules\r
             print 'LibraryClasses = ', p.LibraryClasses \r
-            print 'Pcds = ', p.Pcds                     \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
@@ -622,7 +639,7 @@ if __name__ == '__main__':
             print 'Guids = ', p.Guids                                \r
             print 'Includes = ', p.Includes                         \r
             print 'Packages = ', p.Packages                         \r
-            print 'Pcds = ', p.Pcds                                 \r
+            print 'Pcds = ', p.Pcds\r
             print 'BuildOptions = ', p.BuildOptions\r
             print 'Depex = ', p.Depex\r
             print ''\r