[edk2] [Patch] BaseTools: Fix a bug to use module's Name attribute as compare

Yonghong Zhu posted 1 patch 7 years, 2 months ago
Failed in applying to current master (apply log)
BaseTools/Source/Python/build/build.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[edk2] [Patch] BaseTools: Fix a bug to use module's Name attribute as compare
Posted by Yonghong Zhu 7 years, 2 months ago
Fix a bug to use module's Name attribute as compare for single module
build. ModuleFile.File can't be used to compare INF file, because it
is the relative path.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 BaseTools/Source/Python/build/build.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 13d8e50..a3bb632 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1827,11 +1827,11 @@ class Build():
                 for Arch in Wa.ArchList:
                     AutoGenStart = time.time()
                     GlobalData.gGlobalDefines['ARCH'] = Arch
                     Pa = PlatformAutoGen(Wa, self.PlatformFile, BuildTarget, ToolChain, Arch)
                     for Module in Pa.Platform.Modules:
-                        if self.ModuleFile.Dir == Module.Dir and self.ModuleFile.File == Module.File:
+                        if self.ModuleFile.Dir == Module.Dir and self.ModuleFile.Name == Module.Name:
                             Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile)
                             if Ma == None: continue
                             # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run', 'fds'
                             if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:
                                 # for target which must generate AutoGen code and makefile
-- 
2.6.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] BaseTools: Fix a bug to use module's Name attribute as compare
Posted by Gao, Liming 7 years, 2 months ago
Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: Zhu, Yonghong
>Sent: Monday, October 09, 2017 4:14 PM
>To: edk2-devel@lists.01.org
>Cc: Gao, Liming <liming.gao@intel.com>
>Subject: [Patch] BaseTools: Fix a bug to use module's Name attribute as
>compare
>
>Fix a bug to use module's Name attribute as compare for single module
>build. ModuleFile.File can't be used to compare INF file, because it
>is the relative path.
>
>Cc: Liming Gao <liming.gao@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
>---
> BaseTools/Source/Python/build/build.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/BaseTools/Source/Python/build/build.py
>b/BaseTools/Source/Python/build/build.py
>index 13d8e50..a3bb632 100644
>--- a/BaseTools/Source/Python/build/build.py
>+++ b/BaseTools/Source/Python/build/build.py
>@@ -1827,11 +1827,11 @@ class Build():
>                 for Arch in Wa.ArchList:
>                     AutoGenStart = time.time()
>                     GlobalData.gGlobalDefines['ARCH'] = Arch
>                     Pa = PlatformAutoGen(Wa, self.PlatformFile, BuildTarget, ToolChain,
>Arch)
>                     for Module in Pa.Platform.Modules:
>-                        if self.ModuleFile.Dir == Module.Dir and self.ModuleFile.File ==
>Module.File:
>+                        if self.ModuleFile.Dir == Module.Dir and self.ModuleFile.Name
>== Module.Name:
>                             Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain,
>Arch, self.PlatformFile)
>                             if Ma == None: continue
>                             # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run',
>'fds'
>                             if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:
>                                 # for target which must generate AutoGen code and makefile
>--
>2.6.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel