public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] Make [-D Macros] as optional argument for GenCfgOpt
@ 2017-02-13 10:52 rthomaiy
       [not found] ` <97159AD15C0F454180C255F8DA6613552AF6A003@SHSMSX104.ccr.corp.intel.com>
  2017-02-16 16:24 ` Ma, Maurice
  0 siblings, 2 replies; 3+ messages in thread
From: rthomaiy @ 2017-02-13 10:52 UTC (permalink / raw)
  To: edk2-devel; +Cc: Maurice Ma, Jiewen Yao, Richard Thomaiyar

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Make [-D Macros] as optional argument for GenCfgOpt
       [not found] ` <97159AD15C0F454180C255F8DA6613552AF6A003@SHSMSX104.ccr.corp.intel.com>
@ 2017-02-15  6:34   ` Yao, Jiewen
  0 siblings, 0 replies; 3+ messages in thread
From: Yao, Jiewen @ 2017-02-15  6:34 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: Yao, Jiewen, Ma, Maurice

Reviewed-by: Jiewen.yao@intel.com

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> rthomaiy
> Sent: Monday, February 13, 2017 18:53
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen.yao@intel.com>
> Subject: [edk2] [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
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Make [-D Macros] as optional argument for GenCfgOpt
  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-16 16:24 ` Ma, Maurice
  1 sibling, 0 replies; 3+ messages in thread
From: Ma, Maurice @ 2017-02-16 16:24 UTC (permalink / raw)
  To: Thomaiyar, Richard Marian, edk2-devel@lists.01.org; +Cc: Yao, Jiewen

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-16 16:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox