From nobody Sat Apr 27 15:38:09 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 149247770550764.0472355475531; Mon, 17 Apr 2017 18:08:25 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2FEE42194EB6D; Mon, 17 Apr 2017 18:08:21 -0700 (PDT) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 2EC332195408C for ; Mon, 17 Apr 2017 18:08:19 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Apr 2017 18:08:18 -0700 Received: from mdkinney-mobl.amr.corp.intel.com ([10.241.98.47]) by orsmga005.jf.intel.com with ESMTP; 17 Apr 2017 18:08:19 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,217,1488873600"; d="scan'208";a="88649778" From: Michael Kinney To: edk2-devel@lists.01.org Date: Mon, 17 Apr 2017 18:08:16 -0700 Message-Id: <1492477696-44816-2-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1492477696-44816-1-git-send-email-michael.d.kinney@intel.com> References: <1492477696-44816-1-git-send-email-michael.d.kinney@intel.com> Subject: [edk2] [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: , Cc: Kevin W Shaw , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Yonghong Zhu =20 --- 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 be a +tool that can be executed. If the value contains space characters, then t= he +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 term= inates +or continues processing the DSC file depending on the exit code from the s= cript. +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 scrip= t, +otherwise, `build` terminates normally. The author of the script is respon= sible +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 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" {} {}= ] [ ] * * 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 = = = | | --=20 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel