diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-04-10 07:18:20 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-04-10 07:18:20 +0000 |
commit | 64b2609fcff9d6412eea4c74c8e74bed33dc3235 (patch) | |
tree | b2fa2c1493272b91a04ff4f12384f3ceaa23f1a7 /BaseTools/Source/Python/GenFds/GenFds.py | |
parent | 09e4dbeb5c0ef7d9e178e81f73c9e43f8ef48559 (diff) | |
download | edk2-platforms-64b2609fcff9d6412eea4c74c8e74bed33dc3235.tar.xz |
Sync BaseTools Trunk (version r2518) to EDKII main trunk.
Signed-off-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13178 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/GenFds/GenFds.py')
-rw-r--r-- | BaseTools/Source/Python/GenFds/GenFds.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py index 8a742d95be..fb86a152b6 100644 --- a/BaseTools/Source/Python/GenFds/GenFds.py +++ b/BaseTools/Source/Python/GenFds/GenFds.py @@ -314,7 +314,7 @@ def myOptionParser(): Parser.add_option("-r", "--rom_image", dest="uiFdName", help="Build the image using the [FD] section named by FdUiName.") Parser.add_option("-i", "--FvImage", dest="uiFvName", help="Build the FV image using the [FV] section named by UiFvName") Parser.add_option("-C", "--CapsuleImage", dest="uiCapName", help="Build the Capsule image using the [Capsule] section named by UiCapName") - Parser.add_option("-b", "--buildtarget", type="choice", choices=['DEBUG','RELEASE', 'NOOPT'], dest="BuildTarget", help="Build TARGET is one of list: DEBUG, RELEASE, NOOPT.", + Parser.add_option("-b", "--buildtarget", type="string", dest="BuildTarget", help="Set the build TARGET, overrides target.txt TARGET setting.", action="callback", callback=SingleCheckCallback) Parser.add_option("-t", "--tagname", type="string", dest="ToolChain", help="Using the tools: TOOL_CHAIN_TAG name to build the platform.", action="callback", callback=SingleCheckCallback) @@ -516,10 +516,13 @@ class GenFds : for ModuleFile in PlatformDataBase.Modules: Module = BuildDb.BuildObject[ModuleFile, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.BaseName)) - SaveFileOnChange(GuidXRefFileName, GuidXRefFile.getvalue(), False) + if GuidXRefFile.getvalue(): + SaveFileOnChange(GuidXRefFileName, GuidXRefFile.getvalue(), False) + GenFdsGlobalVariable.InfLogger("\nGUID cross reference file can be found at %s" % GuidXRefFileName) + elif os.path.exists(GuidXRefFileName): + os.remove(GuidXRefFileName) GuidXRefFile.close() - GenFdsGlobalVariable.InfLogger("\nGUID cross reference file can be found at %s" % GuidXRefFileName) - + ##Define GenFd as static function GenFd = staticmethod(GenFd) GetFvBlockSize = staticmethod(GetFvBlockSize) |