From: klu2 Date: Sun, 7 May 2006 16:10:08 +0000 (+0000) Subject: Fix the PCD bug submitted by Oram, Isaac W: X-Git-Tag: edk2-stable201903~25532 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=845fdeba640d599ee72d4a33bb2a5e49de0e52b1 Fix the PCD bug submitted by Oram, Isaac W: 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 --- diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/PCDAutoGenAction.java b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/PCDAutoGenAction.java index ca65c7546c..76a15198c7 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/PCDAutoGenAction.java +++ b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/PCDAutoGenAction.java @@ -115,22 +115,6 @@ public class PCDAutoGenAction extends BuildAction { if(!isEmulatedPCDDriver && moduleName.length() == 0) { throw new BuildActionException("Wrong module name parameter for PCDAutoGenAction tool!"); } - - // - // Check the PCD memory database manager is valid. - // - if(GlobalData.getPCDMemoryDBManager() == null) { - throw new BuildActionException("Memory database has not been initlizated!"); - } - - dbManager = GlobalData.getPCDMemoryDBManager(); - - if(dbManager.getDBSize() == 0) { - throw new BuildActionException("Memory database does not contain any record!"); - } - - ActionMessage.debug(this, - "PCD memory database contains " + dbManager.getDBSize() + " PCD tokens"); } /** @@ -146,6 +130,22 @@ public class PCDAutoGenAction extends BuildAction { void performAction() throws BuildActionException { ActionMessage.debug(this, "Starting PCDAutoGenAction to generate autogen.h and autogen.c!..."); + + // + // Check the PCD memory database manager is valid. + // + if(GlobalData.getPCDMemoryDBManager() == null) { + throw new BuildActionException("Memory database has not been initlizated!"); + } + + dbManager = GlobalData.getPCDMemoryDBManager(); + + if(dbManager.getDBSize() == 0) { + return; + } + + ActionMessage.debug(this, + "PCD memory database contains " + dbManager.getDBSize() + " PCD tokens"); hAutoGenString = ""; cAutoGenString = "";