mirror of https://github.com/acidanthera/audk.git
BaseTools: Normalize case of pathname when evaluating Macros.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2880 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. 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. Signed-off-by: Mingyue Liang <mingyuex.liang@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
This commit is contained in:
parent
a8c77eba37
commit
9641a7f975
|
@ -786,8 +786,10 @@ cleanlib:
|
||||||
|
|
||||||
def ReplaceMacro(self, str):
|
def ReplaceMacro(self, str):
|
||||||
for Macro in self.MacroList:
|
for Macro in self.MacroList:
|
||||||
if self._AutoGenObject.Macros[Macro] and self._AutoGenObject.Macros[Macro] in str:
|
if self._AutoGenObject.Macros[Macro] and os.path.normcase(self._AutoGenObject.Macros[Macro]) in os.path.normcase(str):
|
||||||
str = str.replace(self._AutoGenObject.Macros[Macro], '$(' + Macro + ')')
|
replace_dir = 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 = str.replace(replace_dir, '$(' + Macro + ')')
|
||||||
return str
|
return str
|
||||||
|
|
||||||
def CommandExceedLimit(self):
|
def CommandExceedLimit(self):
|
||||||
|
|
Loading…
Reference in New Issue