public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ma, Maurice" <maurice.ma@intel.com>
To: "Thomaiyar, Richard Marian" <richard.marian.thomaiyar@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Yao, Jiewen" <jiewen.yao@intel.com>
Subject: Re: [PATCH] Make [-D Macros] as optional argument for GenCfgOpt
Date: Thu, 16 Feb 2017 16:24:07 +0000	[thread overview]
Message-ID: <7AAC936950815649B5F88FAE785306C29CA16E3B@ORSMSX114.amr.corp.intel.com> (raw)
In-Reply-To: <20170213105249.55344-1-richard.marian.thomaiyar@intel.com>

Reviewed-by: Maurice Ma <maurice.ma@intel.com>

-Maurice

-----Original Message-----
From: Thomaiyar, Richard Marian 
Sent: Monday, February 13, 2017 2:53 AM
To: edk2-devel@lists.01.org
Cc: Ma, Maurice <maurice.ma@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Thomaiyar, Richard Marian <richard.marian.thomaiyar@intel.com>
Subject: [PATCH] Make [-D Macros] as optional argument for GenCfgOpt

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
---
 IntelFsp2Pkg/Tools/GenCfgOpt.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py b/IntelFsp2Pkg/Tools/GenCfgOpt.py
index 7658b7f..d8038e9 100644
--- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
+++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
@@ -1428,11 +1428,12 @@ def Main():
             else:
                 OutFile = sys.argv[4]
                 Start = 5
-            GenCfgOpt.ParseBuildMode(sys.argv[3])
-            if GenCfgOpt.ParseMacros(sys.argv[Start:]) != 0:
-                print "ERROR: Macro parsing failed !"
-                return 3
+            if argc > Start:
+                if GenCfgOpt.ParseMacros(sys.argv[Start:]) != 0:
+                    print "ERROR: Macro parsing failed !"
+                    return 3
 
+        GenCfgOpt.ParseBuildMode(sys.argv[3])
         FvDir = sys.argv[3]
         if not os.path.exists(FvDir):
             os.makedirs(FvDir)
-- 
2.9.0.windows.1



      parent reply	other threads:[~2017-02-16 16:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13 10:52 [PATCH] Make [-D Macros] as optional argument for GenCfgOpt rthomaiy
     [not found] ` <97159AD15C0F454180C255F8DA6613552AF6A003@SHSMSX104.ccr.corp.intel.com>
2017-02-15  6:34   ` Yao, Jiewen
2017-02-16 16:24 ` Ma, Maurice [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=7AAC936950815649B5F88FAE785306C29CA16E3B@ORSMSX114.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