public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Michael Kinney <michael.d.kinney@intel.com>
To: edk2-devel@lists.01.org
Cc: Kelly Steele <kelly.steele@intel.com>,
	Yonghong Zhu <yonghong.zhu@intel.com>,
	Liming Gao <liming.gao@intel.com>
Subject: [Patch 2/2] BaseTools/GenFds: Skip parse time OUTPUT_DIRECTORY file verify
Date: Fri,  7 Oct 2016 14:33:06 -0700	[thread overview]
Message-ID: <1475875986-9148-3-git-send-email-michael.d.kinney@intel.com> (raw)
In-Reply-To: <1475875986-9148-1-git-send-email-michael.d.kinney@intel.com>

https://bugzilla.tianocore.org/show_bug.cgi?id=132

This patch relaxes the file verification for all FILE statements
to not verify the file exists during initial FDF file parsing
if the file specified is in $(OUTPUT_DIRECTORY).  If a file is
specified does not exist when a section is processed, then a
build break will occur at that time instead.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
---
 BaseTools/Source/Python/GenFds/FdfParser.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 693128c..b7edda9 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -3022,17 +3022,17 @@ class FdfParser:
     ## __VerifyFile
     #
     #    Check if file exists or not:
-    #      If current phase if GenFds, the file must exist;
-    #      If current phase is AutoGen and the file is not in $(OUTPUT_DIRECTORY), the file must exist
+    #      If the file is not in $(OUTPUT_DIRECTORY), then the file must exist
     #    @param FileName: File path to be verified.
     #
     def __VerifyFile(self, FileName):
         if FileName.replace('$(WORKSPACE)', '').find('$') != -1:
             return
-        if not GlobalData.gAutoGenPhase or not self.__GetMacroValue("OUTPUT_DIRECTORY") in FileName:
-            ErrorCode, ErrorInfo = PathClass(NormPath(FileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()
-            if ErrorCode != 0:
-                EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)
+        if self.__GetMacroValue("OUTPUT_DIRECTORY") in FileName:
+            return
+        ErrorCode, ErrorInfo = PathClass(NormPath(FileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()
+        if ErrorCode != 0:
+            EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)
 
     ## __GetCglSection() method
     #
-- 
2.6.3.windows.1



      parent reply	other threads:[~2016-10-07 21:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07 21:33 [Patch 0/2] BaseTools/GenFds: Make FDF parser mode flexible Michael Kinney
2016-10-07 21:33 ` [Patch 1/2] BaseTools/GenFds: Support FDF sections in any order Michael Kinney
2016-10-12  4:13   ` Zhu, Yonghong
2016-10-12 17:11     ` Kinney, Michael D
2016-10-07 21:33 ` Michael Kinney [this message]

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=1475875986-9148-3-git-send-email-michael.d.kinney@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