From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ma1-aaemail-dr-lapp03.apple.com (ma1-aaemail-dr-lapp03.apple.com [17.171.2.72]) by mx.groups.io with SMTP id smtpd.web12.15067.1600871052621422937 for ; Wed, 23 Sep 2020 07:24:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=uBlNf5jN; spf=pass (domain: apple.com, ip: 17.171.2.72, mailfrom: afish@apple.com) Received: from pps.filterd (ma1-aaemail-dr-lapp03.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp03.apple.com (8.16.0.42/8.16.0.42) with SMTP id 08NENXFJ031393; Wed, 23 Sep 2020 07:23:36 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=content-type : content-transfer-encoding : from : mime-version : subject : date : message-id : references : cc : in-reply-to : to; s=20180706; bh=S9Kl3qGCy754UNOzWEtBM4sZlKyJPs/AJXZzxn+p/qA=; b=uBlNf5jNi98l6FMBqz+tuEJg2XIB6CfHfTE8HTZzePtIB3NppbmdnW2DRCoRsv1lM3TZ jML9wQr9weLQlLm16FLYZ98+kbh586zcN91FNO97+67gvNKfYQr4NoADt0ZbGI3FFRlW YVD6ebkZjhw5EMNGoFHUz4RuecUChuZwrmkQgBJW7H40EFCJPtCCjsr1785/UfYAlha7 mder6MKZ/At9Pa2nw6lrDEXQWHql3Xjt84yd2YSm+ee4dwrqaNgewrPaX+QcHPbWfdXM 2K04lY3S6ZIMAdrhNg9124o49C5hhE+Dy0Zs32ZNaPrezqzyyfejgv0SMaVVMYtG52+v zg== Received: from rn-mailsvcp-mta-lapp03.rno.apple.com (rn-mailsvcp-mta-lapp03.rno.apple.com [10.225.203.151]) by ma1-aaemail-dr-lapp03.apple.com with ESMTP id 33ngyutug4-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 23 Sep 2020 07:23:36 -0700 Received: from rn-mailsvcp-mmp-lapp03.rno.apple.com (rn-mailsvcp-mmp-lapp03.rno.apple.com [17.179.253.16]) by rn-mailsvcp-mta-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) with ESMTPS id <0QH4008KA7ZBGIF0@rn-mailsvcp-mta-lapp03.rno.apple.com>; Wed, 23 Sep 2020 07:23:35 -0700 (PDT) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp03.rno.apple.com by rn-mailsvcp-mmp-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) id <0QH400R007KGJC00@rn-mailsvcp-mmp-lapp03.rno.apple.com>; Wed, 23 Sep 2020 07:23:35 -0700 (PDT) X-Va-A: X-Va-T-CD: 4a97d8e3ca7235acfe0b32d689eda258 X-Va-E-CD: a3314b41e4eff180ee821234a1cdfe7c X-Va-R-CD: 05d879b13dac3a14d89238bdef03bbec X-Va-CD: 0 X-Va-ID: fe898667-a4ee-4fec-a41c-865f3a7cf510 X-V-A: X-V-T-CD: 4a97d8e3ca7235acfe0b32d689eda258 X-V-E-CD: a3314b41e4eff180ee821234a1cdfe7c X-V-R-CD: 05d879b13dac3a14d89238bdef03bbec X-V-CD: 0 X-V-ID: b03cbba6-44ee-4444-a46c-31a514373663 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-09-23_10:2020-09-23,2020-09-23 signatures=0 Received: from localhost.localdomain (unknown [10.104.248.254]) by rn-mailsvcp-mmp-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.6.20200729 64bit (built Jul 29 2020)) with ESMTPSA id <0QH400Y7L7ZAIA00@rn-mailsvcp-mmp-lapp03.rno.apple.com>; Wed, 23 Sep 2020 07:23:35 -0700 (PDT) From: "Andrew Fish" MIME-version: 1.0 (1.0) Subject: Re: [edk2-devel] [PATCH] BaseTools: Normalize case of pathname when evaluating Macros. Date: Wed, 23 Sep 2020 07:23:33 -0700 Message-id: References: <20200923105732.34648-1-bob.c.feng@intel.com> Cc: Mingyue Liang , Liming Gao , Yuwei Chen In-reply-to: <20200923105732.34648-1-bob.c.feng@intel.com> To: devel@edk2.groups.io, bob.c.feng@intel.com X-Mailer: iPhone Mail (18A373) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-09-23_10:2020-09-23,2020-09-23 signatures=0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable Does this work on case sensitive file systems? > On Sep 23, 2020, at 3:58 AM, Bob Feng wrote: >=20 > =EF=BB=BFFrom: Mingyue Liang >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2880 >=20 > Currently, When doing the Incremental build, the directory > macros extended to absolute path in output Makefile, which > is inconsistent with the output of Clean build. >=20 > When we do macro replacement, we can't replace macro due to > inconsistent path case, which results in inconsistent display > of incremental build and clean build in makefile.Therefore, > the path is converted to achieve the correct macro replacement. >=20 > Signed-off-by: Mingyue Liang > Cc: Bob Feng > Cc: Liming Gao > Cc: Yuwei Chen > --- > BaseTools/Source/Python/AutoGen/GenMake.py | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Sour= ce/Python/AutoGen/GenMake.py > index 0314d0ea34..b04d3f5436 100755 > --- a/BaseTools/Source/Python/AutoGen/GenMake.py > +++ b/BaseTools/Source/Python/AutoGen/GenMake.py > @@ -786,8 +786,10 @@ cleanlib: >=20 > def ReplaceMacro(self, str): > for Macro in self.MacroList: > - if self._AutoGenObject.Macros[Macro] and self._AutoGenObjec= t.Macros[Macro] in str: > - str =3D str.replace(self._AutoGenObject.Macros[Macro], = '$(' + Macro + ')') > + if self._AutoGenObject.Macros[Macro] and os.path.normcase(s= elf._AutoGenObject.Macros[Macro]) in os.path.normcase(str): > + replace_dir =3D str[os.path.normcase(str).index(os.path= .normcase(self._AutoGenObject.Macros[Macro])): os.path.normcase(str).index( > + os.path.normcase(self._AutoGenObject.Macros[Macro])= ) + len(self._AutoGenObject.Macros[Macro])] > + str =3D str.replace(replace_dir, '$(' + Macro + ')') > return str >=20 > def CommandExceedLimit(self): > --=20 > 2.28.0.windows.1 >=20 >=20 >=20 >=20 >=20 >=20