From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 9E18881FEE for ; Mon, 13 Feb 2017 02:53:24 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2017 02:53:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,156,1484035200"; d="scan'208";a="1106679172" Received: from unknown (HELO RTHOMAIY-DESK3.gar.corp.intel.com) ([10.223.165.169]) by fmsmga001.fm.intel.com with ESMTP; 13 Feb 2017 02:53:22 -0800 From: rthomaiy To: edk2-devel@lists.01.org Cc: Maurice Ma , Jiewen Yao , Richard Thomaiyar Date: Mon, 13 Feb 2017 16:22:49 +0530 Message-Id: <20170213105249.55344-1-richard.marian.thomaiyar@intel.com> X-Mailer: git-send-email 2.9.0.windows.1 Subject: [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: Mon, 13 Feb 2017 10:53:24 -0000 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 = 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