summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2016-04-05 12:29:32 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2016-04-07 13:12:22 +0800
commitd7cd335681d6b1b5791b4e8ef4e311f39469a8c0 (patch)
treefd308727ff6d72e3c657ddc116c751a587ba3aa5 /BaseTools
parent542417972de568fc8c83880042ea7553d901fdb9 (diff)
downloadedk2-d7cd335681d6b1b5791b4e8ef4e311f39469a8c0.tar.gz
edk2-d7cd335681d6b1b5791b4e8ef4e311f39469a8c0.tar.bz2
edk2-d7cd335681d6b1b5791b4e8ef4e311f39469a8c0.zip
BaseTools: Enhance --Pcd which override by build option
This patch 1) enhance the help info for --pcd to use " but not '. 2) Add the condition statements for build option Pcd type check. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py2
-rw-r--r--BaseTools/Source/Python/build/build.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index e9e46c29d7..f29d3680e0 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -352,6 +352,8 @@ class WorkspaceAutoGen(AutoGen):
PGen = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
if GlobalData.BuildOptionPcd:
for i, pcd in enumerate(GlobalData.BuildOptionPcd):
+ if type(pcd) is tuple:
+ continue
(pcdname, pcdvalue) = pcd.split('=')
if not pcdvalue:
EdkLogger.error('build', AUTOGEN_ERROR, "No Value specified for the PCD %s." % (pcdname))
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 5c1fda1a93..ece79ea109 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1941,7 +1941,7 @@ def MyOptionParser():
Parser.add_option("--conf", action="store", type="string", dest="ConfDirectory", help="Specify the customized Conf directory.")
Parser.add_option("--check-usage", action="store_true", dest="CheckUsage", default=False, help="Check usage content of entries listed in INF file.")
Parser.add_option("--ignore-sources", action="store_true", dest="IgnoreSources", default=False, help="Focus to a binary build and ignore all source files")
- Parser.add_option("--pcd", action="append", dest="OptionPcd", help="Set PCD value by command line. Format: 'PcdName=Value' ")
+ Parser.add_option("--pcd", action="append", dest="OptionPcd", help="Set PCD value by command line. Format: \"PcdName=Value\" ")
Parser.add_option("-l", "--cmd-len", action="store", type="int", dest="CommandLength", help="Specify the maximum line length of build command. Default is 4096.")
(Opt, Args) = Parser.parse_args()