From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 F231F21A18AA9 for ; Mon, 17 Apr 2017 19:21:18 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Apr 2017 19:21:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,217,1488873600"; d="scan'208";a="958060630" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 17 Apr 2017 19:21:17 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 17 Apr 2017 19:21:12 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 17 Apr 2017 19:21:12 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.117]) by shsmsx102.ccr.corp.intel.com ([169.254.2.246]) with mapi id 14.03.0319.002; Tue, 18 Apr 2017 10:21:08 +0800 From: "Zhu, Yonghong" To: "Kinney, Michael D" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Shaw, Kevin W" , "Zhu, Yonghong" Thread-Topic: [edk2-DscSpecification PATCH] Declare Pre/Post build scripts in [Defines] section Thread-Index: AQHSt+BKXjEmazUAn0KIxASmOitFZaHJyqcAgACaU1A= Date: Tue, 18 Apr 2017 02:21:08 +0000 Message-ID: References: <1492477696-44816-1-git-send-email-michael.d.kinney@intel.com> <1492477696-44816-2-git-send-email-michael.d.kinney@intel.com> In-Reply-To: <1492477696-44816-2-git-send-email-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [edk2-DscSpecification PATCH] Declare Pre/Post build scripts in [Defines] section X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2017 02:21:19 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu =20 Best Regards, Zhu Yonghong -----Original Message----- From: Kinney, Michael D=20 Sent: Tuesday, April 18, 2017 9:08 AM To: edk2-devel@lists.01.org Cc: Gao, Liming ; Zhu, Yonghong ; Shaw, Kevin W Subject: [edk2-DscSpecification PATCH] Declare Pre/Post build scripts in [D= efines] section https://bugzilla.tianocore.org/show_bug.cgi?id=3D484 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 Cc: Yonghong Zhu Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Kinney --- 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_over= view/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: =20 `Name =3D Value` =20 +If the `PREBUILD` and/or `POSTBUILD` entries are specified, value must=20 +be a tool that can be executed. If the value contains space=20 +characters, then the value must be a quoted string. The `build` tool=20 +suspends processing of the DSC file if the `PREBUILD` entry is present,=20 +calls the script, and either terminates or continues processing the DSC fi= le depending on the exit code from the script. +If the `POSTBUILD` entry is present, prior to the successful `build`=20 +exit, the script is called. If the script fails (non-zero exit code=20 +from the script) `build` terminates immediately using the exit code=20 +returned from the script, otherwise, `build` terminates normally. The=20 +author of the script is responsible for ensuring that the script terminate= s 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 us= ing 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_ds= c_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]` s= ection. [ "VPD_TOOL_GUID" ] [ "PCD_VAR_CHECK_GENERATION" ] + [ "PREBUILD" {} {} = ] + [ "POSTBUILD" {}=20 + {} ] [ ] * * 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 sy= stem. = = = | | | 1.27 | Convert to GitBooks = = = = | April 2017 | | | [#351](https://bugzilla.tianocore.org/show_bug.cgi?id=3D351= ) [DSC Spec] Extend macro usage in the !include statement = = = | | +| | [#484](https://bugzilla.tianocore.org/show_bug.cgi?id=3D484= ) DSC spec: support Prebuild and Postbuild in the [Defines] section = = = | | -- 2.6.3.windows.1