From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0B418820B6 for ; Thu, 16 Feb 2017 08:24:19 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Feb 2017 08:24:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,169,1484035200"; d="scan'208";a="1109199906" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by fmsmga001.fm.intel.com with ESMTP; 16 Feb 2017 08:24:08 -0800 Received: from orsmsx116.amr.corp.intel.com (10.22.240.14) by ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 16 Feb 2017 08:24:08 -0800 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.253]) by ORSMSX116.amr.corp.intel.com ([169.254.7.190]) with mapi id 14.03.0248.002; Thu, 16 Feb 2017 08:24:08 -0800 From: "Ma, Maurice" To: "Thomaiyar, Richard Marian" , "edk2-devel@lists.01.org" CC: "Yao, Jiewen" Thread-Topic: [PATCH] Make [-D Macros] as optional argument for GenCfgOpt Thread-Index: AQHShedq282bJmDVAUqMbmZXm5xPeqFr1giQ Date: Thu, 16 Feb 2017 16:24:07 +0000 Message-ID: <7AAC936950815649B5F88FAE785306C29CA16E3B@ORSMSX114.amr.corp.intel.com> References: <20170213105249.55344-1-richard.marian.thomaiyar@intel.com> In-Reply-To: <20170213105249.55344-1-richard.marian.thomaiyar@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.138] MIME-Version: 1.0 Subject: Re: [PATCH] Make [-D Macros] as optional argument for GenCfgOpt X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2017 16:24:19 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Maurice Ma -Maurice -----Original Message----- From: Thomaiyar, Richard Marian=20 Sent: Monday, February 13, 2017 2:53 AM To: edk2-devel@lists.01.org Cc: Ma, Maurice ; Yao, Jiewen ;= Thomaiyar, Richard Marian Subject: [PATCH] Make [-D Macros] as optional argument for GenCfgOpt Cc: Maurice Ma Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Richard Thomaiyar --- 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 =3D sys.argv[4] Start =3D 5 - GenCfgOpt.ParseBuildMode(sys.argv[3]) - if GenCfgOpt.ParseMacros(sys.argv[Start:]) !=3D 0: - print "ERROR: Macro parsing failed !" - return 3 + if argc > Start: + if GenCfgOpt.ParseMacros(sys.argv[Start:]) !=3D 0: + print "ERROR: Macro parsing failed !" + return 3 =20 + GenCfgOpt.ParseBuildMode(sys.argv[3]) FvDir =3D sys.argv[3] if not os.path.exists(FvDir): os.makedirs(FvDir) --=20 2.9.0.windows.1