* [edk2-DscSpecification PATCH] Declare Pre/Post build scripts in [Defines] section @ 2017-04-18 1:08 Michael Kinney 2017-04-18 1:08 ` Michael Kinney 0 siblings, 1 reply; 3+ messages in thread From: Michael Kinney @ 2017-04-18 1:08 UTC (permalink / raw) To: edk2-devel; +Cc: Liming Gao, Yonghong Zhu, Kevin W Shaw https://bugzilla.tianocore.org/show_bug.cgi?id=484 GitHub branch for review: https://github.com/mdkinney/edk2-DscSpecification/tree/Bugzilla_484_PrePostBuild GitHub branch compare against latest DRAFT for review: https://github.com/tianocore-docs/edk2-DscSpecification/compare/master...mdkinney:Bugzilla_484_PrePostBuild?w=1 Add support for PREBUILD and POSTBUILD defines in the [Defines] section of an DSC to declare scripts that are executed before and after normal DSC/FDF file processing. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Kevin W Shaw <kevin.w.shaw@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Michael Kinney (1): Declare Pre/Post build scripts in [Defines] section 2_dsc_overview/23_[defines]_section_processing.md | 11 +++++++++++ 3_edk_ii_dsc_file_format/35_[defines]_section.md | 2 ++ README.md | 1 + 3 files changed, 14 insertions(+) -- 2.6.3.windows.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [edk2-DscSpecification PATCH] Declare Pre/Post build scripts in [Defines] section 2017-04-18 1:08 [edk2-DscSpecification PATCH] Declare Pre/Post build scripts in [Defines] section Michael Kinney @ 2017-04-18 1:08 ` Michael Kinney 2017-04-18 2:21 ` Zhu, Yonghong 0 siblings, 1 reply; 3+ messages in thread From: Michael Kinney @ 2017-04-18 1:08 UTC (permalink / raw) To: edk2-devel; +Cc: Liming Gao, Yonghong Zhu, Kevin W Shaw https://bugzilla.tianocore.org/show_bug.cgi?id=484 Add support for PREBUILD and POSTBUILD defines in the [Defines] section of an DSC to declare scripts that are executed before and after normal DSC/FDF file processing. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Kevin W Shaw <kevin.w.shaw@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> --- 2_dsc_overview/23_[defines]_section_processing.md | 11 +++++++++++ 3_edk_ii_dsc_file_format/35_[defines]_section.md | 2 ++ README.md | 1 + 3 files changed, 14 insertions(+) diff --git a/2_dsc_overview/23_[defines]_section_processing.md b/2_dsc_overview/23_[defines]_section_processing.md index 7f3c56d..f44ec57 100644 --- a/2_dsc_overview/23_[defines]_section_processing.md +++ b/2_dsc_overview/23_[defines]_section_processing.md @@ -53,6 +53,17 @@ The format for entries in this section is: `Name = Value` +If the `PREBUILD` and/or `POSTBUILD` entries are specified, value must be a +tool that can be executed. If the value contains space characters, then the +value must be a quoted string. The `build` tool suspends processing of the DSC +file if the `PREBUILD` entry is present, calls the script, and either terminates +or continues processing the DSC file depending on the exit code from the script. +If the `POSTBUILD` entry is present, prior to the successful `build` exit, the +script is called. If the script fails (non-zero exit code from the script) +`build` terminates immediately using the exit code returned from the script, +otherwise, `build` terminates normally. The author of the script is responsible +for ensuring that the script terminates with a non-zero exit code when it fails. + All defined elements of the DSC file's `[Defines]` section are valid when parsing the FDF file. The these elements must be treated as Macros when using them in other sections of the DSC and FDF file, as in $(PLATFORM_NAME). diff --git a/3_edk_ii_dsc_file_format/35_[defines]_section.md b/3_edk_ii_dsc_file_format/35_[defines]_section.md index 0785061..3ac6847 100644 --- a/3_edk_ii_dsc_file_format/35_[defines]_section.md +++ b/3_edk_ii_dsc_file_format/35_[defines]_section.md @@ -125,6 +125,8 @@ The `!include` statement may be used in a `[Defines]` section. [<TS> "VPD_TOOL_GUID" <Eq> <RegistryFormatGUID> <EOL>] [<TS> "PCD_VAR_CHECK_GENERATION" <Eq> <TF> <EOL>] + [<TS> "PREBUILD" <Eq> {<AsciiString>} {<QuotedString>} <EOL>] + [<TS> "POSTBUILD" <Eq> {<AsciiString>} {<QuotedString>} <EOL>] [<TS> <AddressStmts>] <IncludeStatement>* <MacroDefinition>* diff --git a/README.md b/README.md index 64bf2b7..31eebe4 100644 --- a/README.md +++ b/README.md @@ -178,3 +178,4 @@ Copyright (c) 2006-2017, Intel Corporation. All rights reserved. | | Added new system environment variables used by the build system. | | | 1.27 | Convert to GitBooks | April 2017 | | | [#351](https://bugzilla.tianocore.org/show_bug.cgi?id=351) [DSC Spec] Extend macro usage in the !include statement | | +| | [#484](https://bugzilla.tianocore.org/show_bug.cgi?id=484) DSC spec: support Prebuild and Postbuild in the [Defines] section | | -- 2.6.3.windows.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-DscSpecification PATCH] Declare Pre/Post build scripts in [Defines] section 2017-04-18 1:08 ` Michael Kinney @ 2017-04-18 2:21 ` Zhu, Yonghong 0 siblings, 0 replies; 3+ messages in thread From: Zhu, Yonghong @ 2017-04-18 2:21 UTC (permalink / raw) To: Kinney, Michael D, edk2-devel@lists.01.org Cc: Gao, Liming, Shaw, Kevin W, Zhu, Yonghong Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Best Regards, Zhu Yonghong -----Original Message----- From: Kinney, Michael D Sent: Tuesday, April 18, 2017 9:08 AM To: edk2-devel@lists.01.org Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>; Shaw, Kevin W <kevin.w.shaw@intel.com> Subject: [edk2-DscSpecification PATCH] Declare Pre/Post build scripts in [Defines] section https://bugzilla.tianocore.org/show_bug.cgi?id=484 Add support for PREBUILD and POSTBUILD defines in the [Defines] section of an DSC to declare scripts that are executed before and after normal DSC/FDF file processing. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Kevin W Shaw <kevin.w.shaw@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> --- 2_dsc_overview/23_[defines]_section_processing.md | 11 +++++++++++ 3_edk_ii_dsc_file_format/35_[defines]_section.md | 2 ++ README.md | 1 + 3 files changed, 14 insertions(+) diff --git a/2_dsc_overview/23_[defines]_section_processing.md b/2_dsc_overview/23_[defines]_section_processing.md index 7f3c56d..f44ec57 100644 --- a/2_dsc_overview/23_[defines]_section_processing.md +++ b/2_dsc_overview/23_[defines]_section_processing.md @@ -53,6 +53,17 @@ The format for entries in this section is: `Name = Value` +If the `PREBUILD` and/or `POSTBUILD` entries are specified, value must +be a tool that can be executed. If the value contains space +characters, then the value must be a quoted string. The `build` tool +suspends processing of the DSC file if the `PREBUILD` entry is present, +calls the script, and either terminates or continues processing the DSC file depending on the exit code from the script. +If the `POSTBUILD` entry is present, prior to the successful `build` +exit, the script is called. If the script fails (non-zero exit code +from the script) `build` terminates immediately using the exit code +returned from the script, otherwise, `build` terminates normally. The +author of the script is responsible for ensuring that the script terminates with a non-zero exit code when it fails. + All defined elements of the DSC file's `[Defines]` section are valid when parsing the FDF file. The these elements must be treated as Macros when using them in other sections of the DSC and FDF file, as in $(PLATFORM_NAME). diff --git a/3_edk_ii_dsc_file_format/35_[defines]_section.md b/3_edk_ii_dsc_file_format/35_[defines]_section.md index 0785061..3ac6847 100644 --- a/3_edk_ii_dsc_file_format/35_[defines]_section.md +++ b/3_edk_ii_dsc_file_format/35_[defines]_section.md @@ -125,6 +125,8 @@ The `!include` statement may be used in a `[Defines]` section. [<TS> "VPD_TOOL_GUID" <Eq> <RegistryFormatGUID> <EOL>] [<TS> "PCD_VAR_CHECK_GENERATION" <Eq> <TF> <EOL>] + [<TS> "PREBUILD" <Eq> {<AsciiString>} {<QuotedString>} <EOL>] + [<TS> "POSTBUILD" <Eq> {<AsciiString>} + {<QuotedString>} <EOL>] [<TS> <AddressStmts>] <IncludeStatement>* <MacroDefinition>* diff --git a/README.md b/README.md index 64bf2b7..31eebe4 100644 --- a/README.md +++ b/README.md @@ -178,3 +178,4 @@ Copyright (c) 2006-2017, Intel Corporation. All rights reserved. | | Added new system environment variables used by the build system. | | | 1.27 | Convert to GitBooks | April 2017 | | | [#351](https://bugzilla.tianocore.org/show_bug.cgi?id=351) [DSC Spec] Extend macro usage in the !include statement | | +| | [#484](https://bugzilla.tianocore.org/show_bug.cgi?id=484) DSC spec: support Prebuild and Postbuild in the [Defines] section | | -- 2.6.3.windows.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-18 2:21 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-04-18 1:08 [edk2-DscSpecification PATCH] Declare Pre/Post build scripts in [Defines] section Michael Kinney 2017-04-18 1:08 ` Michael Kinney 2017-04-18 2:21 ` Zhu, Yonghong
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox