]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix the PCD bug submitted by Oram, Isaac W:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 7 May 2006 16:10:08 +0000 (16:10 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 7 May 2006 16:10:08 +0000 (16:10 +0000)
It is legal that a workspace does *not* contains FPD or a FPD does *not* contains any PCD records,

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@107 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/GenBuild/org/tianocore/build/pcd/action/PCDAutoGenAction.java

index ca65c7546c5666db3b0d523d306971d9d7b17a1d..76a15198c7571ac5377b1b5c0ce7aa638d8924ca 100644 (file)
@@ -115,22 +115,6 @@ public class PCDAutoGenAction extends BuildAction {
         if(!isEmulatedPCDDriver && moduleName.length() == 0) {\r
             throw new BuildActionException("Wrong module name parameter for PCDAutoGenAction tool!");\r
         }\r
-\r
-        //\r
-        // Check the PCD memory database manager is valid.\r
-        //\r
-        if(GlobalData.getPCDMemoryDBManager() == null) {\r
-            throw new BuildActionException("Memory database has not been initlizated!");\r
-        }\r
-\r
-        dbManager = GlobalData.getPCDMemoryDBManager();\r
-\r
-        if(dbManager.getDBSize() == 0) {\r
-            throw new BuildActionException("Memory database does not contain any record!");\r
-        }\r
-\r
-        ActionMessage.debug(this,\r
-                            "PCD memory database contains " + dbManager.getDBSize() + " PCD tokens");\r
     }\r
 \r
     /**\r
@@ -146,6 +130,22 @@ public class PCDAutoGenAction extends BuildAction {
     void performAction() throws BuildActionException {\r
         ActionMessage.debug(this, \r
                             "Starting PCDAutoGenAction to generate autogen.h and autogen.c!...");\r
+                            \r
+        //\r
+        // Check the PCD memory database manager is valid.\r
+        //\r
+        if(GlobalData.getPCDMemoryDBManager() == null) {\r
+            throw new BuildActionException("Memory database has not been initlizated!");\r
+        }\r
+\r
+        dbManager = GlobalData.getPCDMemoryDBManager();\r
+\r
+        if(dbManager.getDBSize() == 0) {\r
+           return; \r
+        }\r
+\r
+        ActionMessage.debug(this,\r
+                            "PCD memory database contains " + dbManager.getDBSize() + " PCD tokens");\r
 \r
         hAutoGenString = "";\r
         cAutoGenString = "";\r