diff options
author | Feng, Bob C <bob.c.feng@intel.com> | 2022-06-25 13:11:40 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-06-28 09:14:55 +0000 |
commit | 59141288716f8917968d4bb96367b7d08fe5ab8a (patch) | |
tree | cfc11c02bdbe49b8ba1eba530768eea417223e0c /BaseTools | |
parent | 7f4eca4cc2e01d4160ef265f477f9d098d7d33df (diff) | |
download | edk2-59141288716f8917968d4bb96367b7d08fe5ab8a.tar.gz |
BaseTools: Fix the GenMake bug for .cpp source file
Build-rules.txt lists .cc and .cpp as supported file extensions.
BaseTools commit 05217d210e introduce a regression issue that
ignore the .cc and .cpp file type.
This patch is to fix this bug.
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Reviewed-by: Yuwei Chen<yuwei.chen@intel.com>
Diffstat (limited to 'BaseTools')
-rwxr-xr-x | BaseTools/Source/Python/AutoGen/GenMake.py | 3 |
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:]
|