]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/GenMake.py
BaseTools: Fix the GenMake bug for .cpp source file
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / GenMake.py
index da406e6ff468e41794a2d5a25d12b06056a2e6fe..92c7bf0cdad52e07795d42b84c77e79f7c0bd81b 100755 (executable)
@@ -1110,7 +1110,8 @@ cleanlib:
                         CmdTargetDict[CmdSign].append(SingleCommandList[-1])\r
                     Index = CommandList.index(Item)\r
                     CommandList.pop(Index)\r
-                    if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLASH, CmdSumDict[CmdSign[3:].rsplit(TAB_SLASH, 1)[0]])):\r
+                    BaseName = SingleCommandList[-1].rsplit('.',1)[0]\r
+                    if BaseName.endswith("%s%s" % (TAB_SLASH, CmdSumDict[CmdSign[3:].rsplit(TAB_SLASH, 1)[0]])):\r
                         Cpplist = CmdCppDict[T.Target.SubDir]\r
                         Cpplist.insert(0, '$(OBJLIST_%d): ' % list(self.ObjTargetDict.keys()).index(T.Target.SubDir))\r
                         source_files = CmdTargetDict[CmdSign][1:]\r