From: Yonghong Zhu <yonghong.zhu@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>,
Michael Kinney <michael.d.kinney@intel.com>,
Kevin W Shaw <kevin.w.shaw@intel.com>
Subject: [Patch 3/5] DSC Spec: Add !error statement support
Date: Thu, 31 May 2018 08:56:22 +0800 [thread overview]
Message-ID: <1527728184-1736-3-git-send-email-yonghong.zhu@intel.com> (raw)
In-Reply-To: <1527728184-1736-1-git-send-email-yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Kevin W Shaw <kevin.w.shaw@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
2_dsc_overview/22_build_description_file_format.md | 21 +++++++++++++---
.../33_platform_dsc_definition.md | 28 ++++++++++++++++++++++
README.md | 1 +
3 files changed, 47 insertions(+), 3 deletions(-)
diff --git a/2_dsc_overview/22_build_description_file_format.md b/2_dsc_overview/22_build_description_file_format.md
index 9c5c9f8..1ce890f 100644
--- a/2_dsc_overview/22_build_description_file_format.md
+++ b/2_dsc_overview/22_build_description_file_format.md
@@ -1,9 +1,9 @@
<!--- @file
2.2 Build Description File Format
- Copyright (c) 2006-2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006-2018, Intel Corporation. All rights reserved.<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without
modification, are permitted provided that the following conditions are met:
@@ -641,11 +641,26 @@ The following are examples of conditional directives.
!else
# The strings do not match exactly
!endif
```
-### 2.2.9 Expressions
+### 2.2.9 !error Statement
+
+The `!error` statement may appear within any section of EDK II DSC 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.
Refer to the EDK II Expression Syntax Specification for additional information.
@@ -702,11 +717,11 @@ names specified on the command line or come from the `Conf/target.txt` file.
For logical expressions, any non-zero value must be considered `TRUE`.
Invalid expressions must cause a build break with an appropriate error message.
-### 2.2.10 Section Handling
+### 2.2.11 Section Handling
The DSC file parsing routines must process the sections so that common
architecture sections are logically merged with the architecturally specific
sections. The architectural sections need to be processed so that they are
logically after the common section. It is recommended that EDK II developers
diff --git a/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md b/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
index 313fc20..d99e20b 100644
--- a/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
+++ b/3_edk_ii_dsc_file_format/33_platform_dsc_definition.md
@@ -734,5 +734,33 @@ as well as to define new entries.
**********
**Note:** The extension used in the example, "mak", is just a three
character extension, and would not processed by `make` or `nmake` commands. It
might just as well have been "foo".
**********
+
+### 3.3.5 !error Statements
+
+Use of this statement is optional.
+
+#### Summary
+This section defines the `!error` statement in EDK II Platform (DSC) files.
+This statement is used to cause build tool to stop at the location where the
+statement is encountered and error message following the `!error` statement
+is output as a message.
+
+#### Prototype
+
+`<ErrorStatement> ::= <TS> "!error" <MTS> <ErrorMessage> <EOL>`
+`<ErrorMessage> ::= <AsciiString>`
+
+#### Parameters
+
+**_ErrorMessage_**
+
+It should in the same line with `!error` statement, and it can consist of several
+words not necessarily in quotes.
+
+#### Example (EDK II DSC)
+
+```
+!error "unsupported feature!"
+```
diff --git a/README.md b/README.md
index 3e14b34..54d50cb 100644
--- a/README.md
+++ b/README.md
@@ -190,5 +190,6 @@ Copyright (c) 2006-2017, Intel Corporation. All rights reserved.
| | Update Skuid value to support Hex number | |
| | Add flexible PCD value format into spec | |
| | Add syntax to support SKU ID inherit from another SKU ID | |
| | Add DefaultStores section to describe the default setting | |
| | Add structure PCD field value assignment syntax | |
+| | Add !error statement section | |
--
2.6.1.windows.1
next prev parent reply other threads:[~2018-05-31 0:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-31 0:56 [Patch 1/5] Build Spec: Add !error statement support Yonghong Zhu
2018-05-31 0:56 ` [Patch 2/5] DEC Spec: !error statement is not permitted in DEC file Yonghong Zhu
2018-05-31 0:56 ` Yonghong Zhu [this message]
2018-05-31 0:56 ` [Patch 4/5] FDF Spec: Add !error statement support Yonghong Zhu
2018-05-31 0:56 ` [Patch 5/5] INF Spec: !error statement is not permitted in INF file Yonghong Zhu
2018-05-31 10:27 ` [Patch 1/5] Build Spec: Add !error statement support Laszlo Ersek
2018-06-01 0:15 ` Zhu, Yonghong
2018-06-04 20:05 ` Kinney, Michael D
2018-06-05 12:36 ` Zhu, Yonghong
2018-06-07 8:00 ` Gao, Liming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1527728184-1736-3-git-send-email-yonghong.zhu@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox