mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
BaseTools: Fix checking for Sources section in INF file
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1804 The check to see if [Sources] section lists all the header type files of a module is missing the exclusion of source files that fall under the scope of Package includes. This change adds the exclusions. Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Tested-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
parent
2b4c07bc22
commit
82407bd129
2 changed files with 37 additions and 3 deletions
|
|
@ -1113,6 +1113,21 @@ class ModuleAutoGen(AutoGen):
|
|||
def IncludePathLength(self):
|
||||
return sum(len(inc)+1 for inc in self.IncludePathList)
|
||||
|
||||
## Get the list of include paths from the packages
|
||||
#
|
||||
# @IncludesList list The list path
|
||||
#
|
||||
@cached_property
|
||||
def PackageIncludePathList(self):
|
||||
IncludesList = []
|
||||
for Package in self.Module.Packages:
|
||||
PackageDir = mws.join(self.WorkspaceDir, Package.MetaFile.Dir)
|
||||
IncludesList = Package.Includes
|
||||
if Package._PrivateIncludes:
|
||||
if not self.MetaFile.Path.startswith(PackageDir):
|
||||
IncludesList = list(set(Package.Includes).difference(set(Package._PrivateIncludes)))
|
||||
return IncludesList
|
||||
|
||||
## Get HII EX PCDs which maybe used by VFR
|
||||
#
|
||||
# efivarstore used by VFR may relate with HII EX PCDs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue