]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
Remove static from SurfaceAreaQuery.java for preparing parallel build.(1)
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / global / GlobalData.java
index 5cb8e6f3e9217e005800df2cf7c0629c7a3a2947..7e1e2c68523d31f9e0b2f94c340473a6aa42329e 100644 (file)
@@ -185,7 +185,7 @@ public class GlobalData {
                 List<DbPathAndFilename> packages = db.getFrameworkDatabase().getPackageList().getFilenameList();\r
                 Iterator<DbPathAndFilename> iter = packages.iterator();\r
                 while (iter.hasNext()) {\r
-                    String fileName = iter.next().getStringValue();\r
+                    String fileName = iter.next().getStringValue().trim();\r
                     Spd spd = new Spd(new File(workspaceDir + File.separatorChar + fileName));\r
                     packageList.add(spd.getPackageId());\r
                     spdTable.put(spd.getPackageId(), spd);\r
@@ -199,7 +199,7 @@ public class GlobalData {
                 List<DbPathAndFilename> platforms = db.getFrameworkDatabase().getPlatformList().getFilenameList();\r
                 Iterator<DbPathAndFilename> iter = platforms.iterator();\r
                 while (iter.hasNext()) {\r
-                    String fileName = iter.next().getStringValue();\r
+                    String fileName = iter.next().getStringValue().trim();\r
                     File fpdFile = new File(workspaceDir + File.separatorChar + fileName);\r
                     if ( !fpdFile.exists() ) {\r
                         throw new BuildException("Platform file [" + fpdFile.getPath() + "] not exists. ");\r
@@ -219,8 +219,8 @@ public class GlobalData {
                     //\r
                     Map<String, XmlObject> fpdDocMap = new HashMap<String, XmlObject>();\r
                     fpdDocMap.put("PlatformSurfaceArea", fpdDoc);\r
-                    SurfaceAreaQuery.setDoc(fpdDocMap);\r
-                    PlatformIdentification platformId = SurfaceAreaQuery.getFpdHeader();\r
+                    SurfaceAreaQuery saq = new SurfaceAreaQuery(fpdDocMap);\r
+                    PlatformIdentification platformId = saq.getFpdHeader();\r
                     platformId.setFpdFile(fpdFile);\r
                     platformList.add(platformId);\r
                 }\r
@@ -412,7 +412,7 @@ public class GlobalData {
             return msaMap;\r
         }\r
         catch (Exception ex){\r
-            throw new BuildException(ex.getMessage());\r
+            throw new BuildException("Parsing MSA file [" + msaFile.getPath() + "] error. \n" + ex.getMessage() );\r
         }\r
     }\r
 \r
@@ -598,7 +598,7 @@ public class GlobalData {
                 return packageId;\r
             }\r
         }\r
-        throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " in the current workspace!");\r
+        throw new BuildException("Can't find package GUID value " + packageId.toGuidString() + " in the current workspace!");\r
     }\r
 \r
     public synchronized static ModuleIdentification refreshModuleIdentification(ModuleIdentification moduleId) throws BuildException {\r
@@ -606,7 +606,7 @@ public class GlobalData {
         moduleId.setPackage(packageId);\r
         Spd spd = spdTable.get(packageId);\r
         if (spd == null) {\r
-            throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " in the current workspace!");\r
+            throw new BuildException("Can't find package GUID value " + packageId.toGuidString() + " in the current workspace!");\r
         }\r
         Set<ModuleIdentification> modules = spd.getModules();\r
         Iterator<ModuleIdentification> iter = modules.iterator();\r
@@ -619,7 +619,7 @@ public class GlobalData {
                 return moduleId;\r
             }\r
         }\r
-        throw new BuildException("Can't find module GUID value " + moduleId.getGuid() + " in package, " + packageId + ", in the current workspace!");\r
+        throw new BuildException("Can't find module GUID value " + moduleId.toGuidString() + " in " + packageId + " under the current workspace!");\r
     }\r
 \r
     public synchronized static Set<PackageIdentification> getPackageList(){\r