git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@136 7335b...
authorhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Wed, 13 Jun 2007 06:42:17 +0000 (06:42 +0000)
committerhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Wed, 13 Jun 2007 06:42:17 +0000 (06:42 +0000)
Source/Python/EdkIIWorkspaceBuild.py
Source/Python/String.py

index 501c7c3..ba681ae 100644 (file)
@@ -319,10 +319,10 @@ class WorkspaceBuild(object):
           elif len(l) == 1:\r
             pb.LibraryClass = LibraryClassObject(l[0], DataType.SUP_MODULE_LIST_STRING)\r
 \r
-        pb.ModuleEntryPointList = (infObj.Defines.DefinesDictionary[TAB_INF_DEFINES_ENTRY_POINT])\r
-        pb.ModuleUnloadImageList = (infObj.Defines.DefinesDictionary[TAB_INF_DEFINES_UNLOAD_IMAGE])\r
-        pb.ConstructorList = (infObj.Defines.DefinesDictionary[TAB_INF_DEFINES_CONSTRUCTOR])\r
-        pb.DestructorList = (infObj.Defines.DefinesDictionary[TAB_INF_DEFINES_DESTRUCTOR])\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
+        pb.ConstructorList.extend(infObj.Defines.DefinesDictionary[TAB_INF_DEFINES_CONSTRUCTOR])\r
+        pb.DestructorList.extend(infObj.Defines.DefinesDictionary[TAB_INF_DEFINES_DESTRUCTOR])\r
 \r
         #Sources\r
         for index in range(len(infObj.Contents[key].Sources)):\r
@@ -500,11 +500,11 @@ if __name__ == '__main__':
 #  print ewb.DecDatabase\r
   \r
   #\r
-  for key in DataType.ARCH_LIST:\r
-    print key\r
+  for arch in DataType.ARCH_LIST:\r
+    print arch\r
     print 'Platform'\r
-    for platform in ewb.Build[key].PlatformDatabase.keys():\r
-      p = ewb.Build[key].PlatformDatabase[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
@@ -517,8 +517,8 @@ if __name__ == '__main__':
     #End of Platform\r
   \r
     print 'package'\r
-    for package in ewb.Build[key].PackageDatabase.keys():\r
-      p = ewb.Build[key].PackageDatabase[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
@@ -532,8 +532,8 @@ if __name__ == '__main__':
     #End of Package\r
     \r
     print 'module'\r
-    for module in ewb.Build[key].ModuleDatabase.keys():\r
-      p = ewb.Build[key].ModuleDatabase[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
index 20109c3..d79dc03 100644 (file)
@@ -204,19 +204,28 @@ def GetSingleValueOfKeyFromLines(Lines, Dictionary, CommentCharacter, KeySplitCh
     LineList = Line.split(KeySplitCharacter, 1)\r
     if len(LineList) >= 2:\r
       Key = LineList[0].split()\r
-      if len(Key) == 1 and Key[0][0] != CommentCharacter and Key[0] not in Keys:\r
+      if len(Key) == 1 and Key[0][0] != CommentCharacter:\r
         #Remove comments and white spaces\r
         LineList[1] = CleanString(LineList[1], CommentCharacter)\r
-\r
         if ValueSplitFlag:\r
           ValueList = LineList[1].replace('\\','/').split(ValueSplitCharacter)\r
           if len(ValueList) == 1:\r
             Value = ValueList[0]\r
         else:\r
           Value = CleanString(LineList[1], CommentCharacter)\r
-\r
-        Dictionary[Key[0]] = Value\r
-        Keys += [Key[0]]\r
+            \r
+        if Key[0] not in Keys:\r
+          Keys += [Key[0]]\r
+          Dictionary[Key[0]] = Value\r
+        else:\r
+          tmp = []\r
+          old = Dictionary[Key[0]]\r
+          if type(old) != type([]):\r
+            tmp.extend(old.split())\r
+          else:\r
+            tmp.extend(old)\r
+          tmp.extend(Value.split())\r
+          Dictionary[Key[0]] = tmp\r
         \r
   return True\r
 \r