BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2003
lstrip(parameter) do the match based on the char
in parameter but not only the whole parameter string.
In GenMake line 1082,
CmdSign.lstrip('/Fo') will strip the '/' or
'F' or 'o' on the left of CmdSign. This is not expected.
This patch is going to fix such issue.
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
CmdTargetDict[CmdSign] = "%s %s" % (CmdTargetDict[CmdSign], SingleCommandList[-1])\r
Index = CommandList.index(Item)\r
CommandList.pop(Index)\r
- if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLASH, CmdSumDict[CmdSign.lstrip('/Fo').rsplit(TAB_SLASH, 1)[0]])):\r
+ if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLASH, CmdSumDict[CmdSign[3:].rsplit(TAB_SLASH, 1)[0]])):\r
Cpplist = CmdCppDict[T.Target.SubDir]\r
Cpplist.insert(0, '$(OBJLIST_%d): $(COMMON_DEPS)' % list(self.ObjTargetDict.keys()).index(T.Target.SubDir))\r
T.Commands[Index] = '%s\n\t%s' % (' \\\n\t'.join(Cpplist), CmdTargetDict[CmdSign])\r
def GetPcdValue (PcdPattern):\r
if PcdPattern is None:\r
return None\r
- PcdPair = PcdPattern.lstrip('PCD(').rstrip(')').strip().split('.')\r
+ if PcdPattern.startswith('PCD('):\r
+ PcdPair = PcdPattern[4:].rstrip(')').strip().split('.')\r
+ else:\r
+ PcdPair = PcdPattern.strip().split('.')\r
TokenSpace = PcdPair[0]\r
TokenCName = PcdPair[1]\r
\r