summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rwxr-xr-xBaseTools/Source/Python/AutoGen/GenMake.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py
index da406e6ff4..92c7bf0cda 100755
--- a/BaseTools/Source/Python/AutoGen/GenMake.py
+++ b/BaseTools/Source/Python/AutoGen/GenMake.py
@@ -1110,7 +1110,8 @@ cleanlib:
CmdTargetDict[CmdSign].append(SingleCommandList[-1])
Index = CommandList.index(Item)
CommandList.pop(Index)
- if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLASH, CmdSumDict[CmdSign[3:].rsplit(TAB_SLASH, 1)[0]])):
+ BaseName = SingleCommandList[-1].rsplit('.',1)[0]
+ if BaseName.endswith("%s%s" % (TAB_SLASH, CmdSumDict[CmdSign[3:].rsplit(TAB_SLASH, 1)[0]])):
Cpplist = CmdCppDict[T.Target.SubDir]
Cpplist.insert(0, '$(OBJLIST_%d): ' % list(self.ObjTargetDict.keys()).index(T.Target.SubDir))
source_files = CmdTargetDict[CmdSign][1:]