From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Permerror (SPF Permanent Error: Two or more type TXT spf records found.) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 BC64D21106C86 for ; Mon, 3 Sep 2018 19:38:11 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2018 19:38:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,327,1531810800"; d="scan'208";a="70086399" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by orsmga007.jf.intel.com with ESMTP; 03 Sep 2018 19:37:53 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: zhijufan , Liming Gao Date: Tue, 4 Sep 2018 10:37:50 +0800 Message-Id: <1536028670-10860-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch] BaseTools: Extend the keyword "!include"/"!if" to case-insensitive X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2018 02:38:11 -0000 From: zhijufan Extend the keyword "!include", "!if", etc to case-insensitive. Current DSC parser already support it, while FDF parser only support the lower case, so this patch add the support for FDF parser. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/GenFds/FdfParser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index 8de0b48..7e1be65 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -1111,10 +1111,12 @@ class FdfParser: EndPos = self.CurrentOffsetWithinLine if self.CurrentLineNumber != StartLine: EndPos = len(self.Profile.FileLinesList[StartLine-1]) self.__Token = self.Profile.FileLinesList[StartLine-1][StartPos : EndPos] + if self.__Token.lower() in [TAB_IF, TAB_END_IF, TAB_ELSE_IF, TAB_ELSE, TAB_IF_DEF, TAB_IF_N_DEF, TAB_ERROR, TAB_INCLUDE]: + self.__Token = self.__Token.lower() if StartPos != self.CurrentOffsetWithinLine: return True else: return False -- 2.6.1.windows.1