REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1210
FixedAtBuild PCD is suggested to be used instead
of FeatureFlag PCD so extend this tool to support.
Also skipped PCDs which commented out by '#'.
Test: Verified with FixedAtBuild PCD for including or
excluding lines in generated UPD header files successfully.
Cc: Jiewen Yao <Jiewen.yao@intel.com>
Cc: Gao Liming <liming.gao@intel.com>
Cc: Zhu Yonghong <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
-# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials are licensed and made available under\r
# the terms and conditions of the BSD License that accompanies this distribution.\r
# The full text of the license may be found at\r
# This program and the accompanying materials are licensed and made available under\r
# the terms and conditions of the BSD License that accompanies this distribution.\r
# The full text of the license may be found at\r
IsUpdSect = False\r
if Match.group(1).lower() == "Defines".lower():\r
IsDefSect = True\r
IsUpdSect = False\r
if Match.group(1).lower() == "Defines".lower():\r
IsDefSect = True\r
- if Match.group(1).lower() == "PcdsFeatureFlag".lower():\r
+ if (Match.group(1).lower() == "PcdsFeatureFlag".lower() or Match.group(1).lower() == "PcdsFixedAtBuild".lower()):\r
IsPcdSect = True\r
elif Match.group(1).lower() == "PcdsDynamicVpd.Upd".lower():\r
ConfigDict = {}\r
IsPcdSect = True\r
elif Match.group(1).lower() == "PcdsDynamicVpd.Upd".lower():\r
ConfigDict = {}\r
IfStack.append(Result)\r
ElifStack.append(0)\r
else:\r
IfStack.append(Result)\r
ElifStack.append(0)\r
else:\r
- Match = re.match("!(if|elseif)\s+(.+)", DscLine)\r
+ Match = re.match("!(if|elseif)\s+(.+)", DscLine.split("#")[0])\r
if Match:\r
Result = self.EvaluateExpress(Match.group(2))\r
if Match.group(1) == "if":\r
if Match:\r
Result = self.EvaluateExpress(Match.group(2))\r
if Match.group(1) == "if":\r