From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: zhijux.fan@intel.com) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by groups.io with SMTP; Mon, 06 May 2019 19:22:30 -0700 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 May 2019 19:22:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,440,1549958400"; d="dat'59?scan'59,208,59";a="137628401" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga007.jf.intel.com with ESMTP; 06 May 2019 19:22:29 -0700 Received: from fmsmsx162.amr.corp.intel.com (10.18.125.71) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 6 May 2019 19:22:28 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx162.amr.corp.intel.com (10.18.125.71) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 6 May 2019 19:22:28 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.129]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.10]) with mapi id 14.03.0415.000; Tue, 7 May 2019 10:22:26 +0800 From: "Fan, ZhijuX" To: "devel@edk2.groups.io" CC: "Gao, Liming" , "Feng, Bob C" Subject: [PATCH V2] BaseTools:improve code to support C files with .C suffixes Thread-Topic: [PATCH V2] BaseTools:improve code to support C files with .C suffixes Thread-Index: AdUEe7SOF0Lb/xo/QTyWjhkmAT2wuw== Date: Tue, 7 May 2019 02:22:25 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zhijux.fan@intel.com X-Groupsio-MsgNum: 40063 Content-Type: multipart/mixed; boundary="_000_FAD0D7E0AE0FA54D987F6E72435CAFD50AF5BEA3SHSMSX101ccrcor_" Content-Language: en-US --_000_FAD0D7E0AE0FA54D987F6E72435CAFD50AF5BEA3SHSMSX101ccrcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1773 Build break if C file suffixes of named .C instead of .c Code not recognize filenames with .C suffixes. This patch adds code to Support both .c file and .C file Cc: Bob Feng Cc: Liming Gao Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/AutoGen/GenMake.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/= Python/AutoGen/GenMake.py index 0e0f9fd9b0..858ddedf8e 100644 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -1035,7 +1035,8 @@ cleanlib: CmdTargetDict[CmdSign] =3D "%s %s" % (CmdTargetDic= t[CmdSign], SingleCommandList[-1]) Index =3D CommandList.index(Item) CommandList.pop(Index) - if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLAS= H, CmdSumDict[CmdSign.lstrip('/Fo').rsplit(TAB_SLASH, 1)[0]])): + if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLAS= H, CmdSumDict[T.Target.SubDir])) or \ + SingleCommandList[-1].endswith("%s%s.C" % (TAB= _SLASH, CmdSumDict[T.Target.SubDir])): Cpplist =3D CmdCppDict[T.Target.SubDir] Cpplist.insert(0, '$(OBJLIST_%d): $(COMMON_DEPS)' = % list(self.ObjTargetDict.keys()).index(T.Target.SubDir)) T.Commands[Index] =3D '%s\n\t%s' % (' \\\n\t'.join= (Cpplist), CmdTargetDict[CmdSign]) --=20 2.14.1.windows.1 --_000_FAD0D7E0AE0FA54D987F6E72435CAFD50AF5BEA3SHSMSX101ccrcor_ Content-Disposition: attachment; filename="winmail.dat" Content-Transfer-Encoding: base64 Content-Type: application/ms-tnef; name="winmail.dat" eJ8+IkJzAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEJgAEAIQAAAEZFOEJDODVE QkYwNEM3NEFCRTk5MUNGRURENTRCNjcxAJ0HAQ2ABAACAAAAAgACAAEFgAMADgAAAOMHBQAHAAIA FgAZAAIAKQEBIIADAA4AAADjBwUABwACABYAGQACACkBAQiABwAYAAAASVBNLk1pY3Jvc29mdCBN YWlsLk5vdGUAMQgBBIABAEYAAABbUEFUQ0ggVjJdIEJhc2VUb29sczppbXByb3ZlIGNvZGUgdG8g c3VwcG9ydCBDIGZpbGVzIHdpdGggLkMgc3VmZml4ZXMAQxgBC4ABACEAAABGRThCQzg1REJGMDRD NzRBQkU5OTFDRkVERDU0QjY3MQCdBwEDkAYAlA4AADQAAAACAX8AAQAAAEgAAAA8RkFEMEQ3RTBB RTBGQTU0RDk4N0Y2RTcyNDM1Q0FGRDUwQUY1QkVBM0BTSFNNU1gxMDEuY2NyLmNvcnAuaW50ZWwu Y29tPgALAB8OAQAAAAIBCRABAAAAqQQAAKUEAABbCAAATFpGdbU73UVhAApmYmlkBAAAY2PAcGcx MjUyAP4DQ/B0ZXh0AfcCpAPjAgAEY2gKwHNldDAg7wdtAoMAUBFNMgqABrQCgJZ9CoAIyDsJYjE5 DsC/CcMWcgoyFnECgBViKgmwcwnwBJBhdAWyDlADYHOibwGAIEV4EcFuGDBdBlJ2BJAXtgIQcgDA dH0IUG4aMRAgBcAFoBtkZJogA1IgECIXslx2CJDkd2sLgGQ1HVME8AdADRdwMApxF/Jia21rBnMB kAAgIEJNX0LgRUdJTn0K/AHxC/EhH7BaOiBoAkBwc4A6Ly9idWd6AxBJC2AudAcwbm8FoWUCLgWw Zy9zaG93gl8iYS5jZ2k/DdCAPTE3NzNcbAuAZmUKgSUkQnUDEBxgYpEJc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