public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: "Zhu, Yonghong" <yonghong.zhu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Shaw, Kevin W" <kevin.w.shaw@intel.com>
Subject: Re: [Patch] Build Spec: Extend exclamation statement's keyword to case-insensitive
Date: Thu, 6 Sep 2018 05:16:52 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E2EE546@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1535961137-17412-1-git-send-email-yonghong.zhu@intel.com>

Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>Yonghong Zhu
>Sent: Monday, September 03, 2018 3:52 PM
>To: edk2-devel@lists.01.org
>Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Shaw, Kevin W
><kevin.w.shaw@intel.com>; Gao, Liming <liming.gao@intel.com>
>Subject: [edk2] [Patch] Build Spec: Extend exclamation statement's keyword
>to case-insensitive
>
>This patch add some description for "!include", "!error", "!if", etc,
>to extend those statement's keyword to case-insensitive.
>
>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>
>---
> .../82_auto-generation_process.md                  | 22 +++++++++++++---------
> README.md                                          |  1 +
> 2 files changed, 14 insertions(+), 9 deletions(-)
>
>diff --git a/8_pre-build_autogen_stage/82_auto-generation_process.md
>b/8_pre-build_autogen_stage/82_auto-generation_process.md
>index abfa55c..6ce1710 100644
>--- a/8_pre-build_autogen_stage/82_auto-generation_process.md
>+++ b/8_pre-build_autogen_stage/82_auto-generation_process.md
>@@ -268,11 +268,11 @@ Multiple library class instances for a single library
>class must not be
> specified in the same `[LibraryClasses]` or `<LibraryClasses>` section in the
> DSC file.
>
> #### 8.2.4.1 !include Files
>
>-The DSC (and FDF) file can use `!include` statements to include text files that
>+The DSC and FDF file can use `!include` statements to include text files that
> contain content that would appear in the DSC file. When gathering the
>content
> from the DSC (or FDF) file, the file pointed to by the !include statement is
> read before any other information that appears later in the file.
>
> The build system does not parse the files as the lines are read, but rather the
>@@ -283,10 +283,12 @@ If only a filename is provided, the file must be
>located in the same directory
> as the DSC or FDF file. Use of `$(WORKSPACE)/<Path>/<Filename>` is allowed
> for include files outside of the directory tree containing the DSC or FDF file,
> or `<Path>/<Filename>` if the include file is in the directory tree
> containing the DSC or FDF file.
>
>+The keyword `!include` is case-insensitive.
>+
> #### 8.2.4.2 INF and DEC Parsing
>
> The build tools try to parse the INF file one by one, including the INF file
> for library instances. From the INF file, the build tools collect information
> such as source file list, library class list, package list, GUID/Protocol/PPI
>@@ -594,18 +596,18 @@ enclosed by double quotation marks.
> When testing values for PCDs, only the PCD name is required:
> `TokenSpaceGuidCname.PcdCname`; enclosing the PCD name in "$(" and ")"
>is not
> permitted.
>
> Supported statements are: `!ifdef`, `!ifndef`, `!if`, `!else`, `!elseif` and
>-`!endif`. These control statements are used to either include or exclude lines
>-as the parsing tool processes these files. The `!ifdef` and `!ifndef`
>-statements test whether a Macro has been defined or not defined (PCDs are
>-always defined - the build will break if a PCD is used by a module specified in
>-the DSC file that cannot be located in any of the dependent DEC files, from
>the
>-`[Packages]` section of an INF specified in the DSC file). FeatureFlag and
>-FixedAtBuild access methods are the only PCDs that can be used in
>conditional
>-directives.
>+`!endif`, and those keywords are case-insensitive. These control statements
>are
>+used to either include or exclude lines as the parsing tool processes these
>files.
>+The `!ifdef` and `!ifndef` statements test whether a Macro has been defined
>or
>+not defined (PCDs are always defined - the build will break if a PCD is used by
>+a module specified in the DSC file that cannot be located in any of the
>dependent
>+DEC files, from the `[Packages]` section of an INF specified in the DSC file).
>+FeatureFlag and FixedAtBuild access methods are the only PCDs that can be
>used in
>+conditional directives.
>
> The build system will process the DSC and FDF files more than once. The first
> pass is to pick up all macros and PCD values for macros and PCDs used in
> conditional directives, then on the second pass, process the conditional
> directive content. This second pass is required as there is no required order
>@@ -1064,10 +1066,12 @@ source files and generate the binary files.
>
> The DSC and FDF file can use `!error` statement. 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 keyword `!error` is case-insensitive.
>+
> ### 8.2.5 Post processing
>
> Once all files are parsed, the build tools will do following work for each EDK
> II module:
>
>diff --git a/README.md b/README.md
>index 9ca8733..8b20643 100644
>--- a/README.md
>+++ b/README.md
>@@ -225,5 +225,6 @@ Copyright (c) 2008-2017, Intel Corporation. All rights
>reserved.
> |            | Update PCD value and SKU, DefaultStore info in build report
>|               |
> |            | Clarify structure PCD field value assignment precedence
>|               |
> |            | Update description for build handles PCDs for SKU support
>|               |
> |            | Add statement about module scoped `<Pcd*>` section override
>scope
>|               |
> |            | Add !error statement section
>|               |
>+|            | Extend exclamation statement's keyword to case-insensitive
>|               |
>--
>2.6.1.windows.1
>
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel


      reply	other threads:[~2018-09-06  5:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03  7:52 [Patch] Build Spec: Extend exclamation statement's keyword to case-insensitive Yonghong Zhu
2018-09-06  5:16 ` Gao, Liming [this message]

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=4A89E2EF3DFEDB4C8BFDE51014F606A14E2EE546@SHSMSX104.ccr.corp.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