public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Christian Rodriguez" <christian.rodriguez@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Rodriguez, Christian" <christian.rodriguez@intel.com>
Cc: "Feng, Bob C" <bob.c.feng@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>,
	"Zhu, Yonghong" <yonghong.zhu@intel.com>
Subject: Re: [edk2-devel] [Patch V3 1/2] BaseTools: Add a checking for Sources section in INF file [Part 1/2]
Date: Wed, 29 May 2019 14:05:22 +0000	[thread overview]
Message-ID: <3A7DCC9A944C6149BF832E1C9B718ABC01F24A77@ORSMSX112.amr.corp.intel.com> (raw)
In-Reply-To: <15A1A56CC74451E6.22107@groups.io>

Please review. Bump.

>-----Original Message-----
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Christian Rodriguez
>Sent: Friday, May 24, 2019 7:40 AM
>To: devel@edk2.groups.io
>Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming
><liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
>Subject: [edk2-devel] [Patch V3 1/2] BaseTools: Add a checking for Sources
>section in INF file [Part 1/2]
>
>BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1804
>
>In V3: Seperate checker and hashing into individual patches In V2: Enable
>check for all builds, move conditional to hash invalidation In the Edk2 INF spec
>3.9, it states, All HII Unicode format files must be listed in [Sources] section.
>Add a check to see if [Sources] section lists all the "source" type files of a
>module. Performance impact should be minimal with this patch since
>information is already being fetched for Makefile purposes. All other
>information is already cached in memory. No extra IO time is needed. Part 1 is
>checker only.
>
>Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com>
>Cc: Bob Feng <bob.c.feng@intel.com>
>Cc: Liming Gao <liming.gao@intel.com>
>Cc: Yonghong Zhu <yonghong.zhu@intel.com>
>---
> BaseTools/Source/Python/AutoGen/GenMake.py | 38
>++++++++++++++++++++
> 1 file changed, 38 insertions(+)
>
>diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py
>b/BaseTools/Source/Python/AutoGen/GenMake.py
>index 0e0f9fd9b0..5c992d7c26 100644
>--- a/BaseTools/Source/Python/AutoGen/GenMake.py
>+++ b/BaseTools/Source/Python/AutoGen/GenMake.py
>@@ -905,6 +905,44 @@ cleanlib:
>                                     ForceIncludedFile,
>                                     self._AutoGenObject.IncludePathList +
>self._AutoGenObject.BuildOptionIncPathList
>                                     )
>+
>+        # Check if header files are listed in metafile
>+        # Get a list of unique module header source files from MetaFile
>+        headerFilesInMetaFileSet = set()
>+        for aFile in self._AutoGenObject.SourceFileList:
>+            aFileName = str(aFile)
>+            if not aFileName.endswith('.h'):
>+                continue
>+            headerFilesInMetaFileSet.add(aFileName.lower())
>+
>+        # Get a list of unique module autogen files
>+        localAutoGenFileSet = set()
>+        for aFile in self._AutoGenObject.AutoGenFileList:
>+            localAutoGenFileSet.add(str(aFile).lower())
>+
>+        # Get a list of unique module dependency header files
>+        # Exclude autogen files and files not in the source directory
>+        headerFileDependencySet = set()
>+        localSourceDir = str(self._AutoGenObject.SourceDir).lower()
>+        for Dependency in FileDependencyDict.values():
>+            for aFile in Dependency:
>+                aFileName = str(aFile).lower()
>+                if not aFileName.endswith('.h'):
>+                    continue
>+                if aFileName in localAutoGenFileSet:
>+                    continue
>+                if localSourceDir not in aFileName:
>+                    continue
>+                headerFileDependencySet.add(aFileName)
>+
>+        # Check if a module dependency header file is missing from the module's
>MetaFile
>+        for aFile in headerFileDependencySet:
>+            if aFile in headerFilesInMetaFileSet:
>+                continue
>+            EdkLogger.warn("build","Module MetaFile [Sources] is missing local
>header!",
>+                        ExtraData = "Local Header: " + aFile + " not found in " +
>self._AutoGenObject.MetaFile.Path
>+                        )
>+
>         DepSet = None
>         for File,Dependency in FileDependencyDict.items():
>             if not Dependency:
>--
>2.19.1.windows.1
>
>
>


  parent reply	other threads:[~2019-05-29 14:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-24 14:40 [Patch V3 0/2] BaseTools: Add a checking for Sources section in INF file [Part 0/2] Christian Rodriguez
2019-05-24 14:40 ` [Patch V3 1/2] BaseTools: Add a checking for Sources section in INF file [Part 1/2] Christian Rodriguez
2019-05-24 14:40 ` [Patch V3 2/2] BaseTools: Add a checking for Sources section in INF file [Part 2/2] Christian Rodriguez
     [not found] ` <15A1A56D09F177FE.23782@groups.io>
2019-05-29 14:05   ` [edk2-devel] " Christian Rodriguez
     [not found] ` <15A1A56CC74451E6.22107@groups.io>
2019-05-29 14:05   ` Christian Rodriguez [this message]
2019-05-29 14:13 ` [edk2-devel] [Patch V3 0/2] BaseTools: Add a checking for Sources section in INF file [Part 0/2] Liming Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A7DCC9A944C6149BF832E1C9B718ABC01F24A77@ORSMSX112.amr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox