From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 3D3FB21B02845 for ; Wed, 30 May 2018 17:56:39 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 May 2018 17:56:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,462,1520924400"; d="scan'208";a="59975568" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by fmsmga001.fm.intel.com with ESMTP; 30 May 2018 17:56:36 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Liming Gao , Michael Kinney , Kevin W Shaw Date: Thu, 31 May 2018 08:56:23 +0800 Message-Id: <1527728184-1736-4-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 In-Reply-To: <1527728184-1736-1-git-send-email-yonghong.zhu@intel.com> References: <1527728184-1736-1-git-send-email-yonghong.zhu@intel.com> Subject: [Patch 4/5] FDF Spec: Add !error statement support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 May 2018 00:56:39 -0000 Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- .../22_flash_description_file_format.md | 17 +++++++++++- 3_edk_ii_fdf_file_format/32_fdf_definition.md | 30 +++++++++++++++++++++- README.md | 1 + 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/2_fdf_design_discussion/22_flash_description_file_format.md b/2_fdf_design_discussion/22_flash_description_file_format.md index 368ce32..8b29fda 100644 --- a/2_fdf_design_discussion/22_flash_description_file_format.md +++ b/2_fdf_design_discussion/22_flash_description_file_format.md @@ -615,11 +615,26 @@ The following is an example of conditional statements. # FOO is not defined while BARFOO is either NOT defined or does not # equal "FOOBAR" !endif ``` -### 2.2.9 Expressions +### 2.2.9 !error Statement + +The `!error` statement may appear within any section of EDK II FDF file. The +argument of this statement is an error message, it causes build tool to stop +at the location where the statement is encountered and error message following +the `!error` statement is output as a message. + +The following example show the valid usage of the `!error` statement. + +```ini +!if $(FEATURE_ENABLE) == TRUE + !error "unsupported feature!" +!endif +``` + +### 2.2.10 Expressions Expressions can be used in conditional directive comparison statements and in value fields for Macros and PCDs in the DSC and FDF files. Expressions follow C relation, equality, logical and bitwise precedence and diff --git a/3_edk_ii_fdf_file_format/32_fdf_definition.md b/3_edk_ii_fdf_file_format/32_fdf_definition.md index 1379db4..a097751 100644 --- a/3_edk_ii_fdf_file_format/32_fdf_definition.md +++ b/3_edk_ii_fdf_file_format/32_fdf_definition.md @@ -1,9 +1,9 @@