From nobody Sat May 18 04:46:23 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.zohomail.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 1504083646330475.0054713368163; Wed, 30 Aug 2017 02:00:46 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4F52421E95E18; Wed, 30 Aug 2017 01:58:03 -0700 (PDT) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 1D26C21E95DFF for ; Wed, 30 Aug 2017 01:58:02 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP; 30 Aug 2017 02:00:43 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by orsmga001.jf.intel.com with ESMTP; 30 Aug 2017 02:00:42 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,448,1498546800"; d="scan'208";a="1167526861" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Wed, 30 Aug 2017 17:00:37 +0800 Message-Id: <1504083637-1276-2-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 In-Reply-To: <1504083637-1276-1-git-send-email-yonghong.zhu@intel.com> References: <1504083637-1276-1-git-send-email-yonghong.zhu@intel.com> Subject: [edk2] [Patch] DSC Spec: Add multi-arg support to PREBUILD/POSTBUILD 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: Michael Kinney , 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" fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=3D669 Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- 2_dsc_overview/23_[defines]_section_processing.md | 22 ++++++++++++++-----= --- 3_edk_ii_dsc_file_format/35_[defines]_section.md | 12 ++++++++++-- README.md | 1 + 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/2_dsc_overview/23_[defines]_section_processing.md b/2_dsc_over= view/23_[defines]_section_processing.md index 96d02a0..95c2893 100644 --- a/2_dsc_overview/23_[defines]_section_processing.md +++ b/2_dsc_overview/23_[defines]_section_processing.md @@ -53,18 +53,22 @@ 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. +value must be a quoted string. The `PREBUILD` and `POSTBUILD` enty support +multiple arguments, and tool will convert the arguments that are WORKSPACE= or +PACKAGES_PATH relative paths to absolute paths. Quotes may be used for arg= uments +that have spaces or special characters. The `build` tool suspends processi= ng of +the DSC file if the `PREBUILD` entry is present, calls the script, and eit= her +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 t= he +script) `build` terminates immediately using the exit code returned from t= he +script, otherwise, `build` terminates normally. The author of the script is +responsible for ensuring that the script terminates with a non-zero exit c= ode +when it fails. =20 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). =20 @@ -114,10 +118,12 @@ item is required. | `RFC_LANGUAGES` | Optional | RFC4646 Language code list= | A semi-colon ";" separated list of RFC4646 Language codes (EDK II = Modules) used during the generation of only a set, rather than all, UNICODE= languages during the StrGather AutoGen phase. The list must be encapsulate= d in double quotes. = = | | `ISO_LANGUAGES` | Optional | ISO-639-2 Language code li= st | A non-separated list of three character ISO 639-2 Language codes (= EDK Components) used during the generation of only a set, rather than all, = UNICODE languages during the StrGather AutoGen phase. The list must be enca= psulated in double quotes. = = | | `VPD_TOOL_GUID` | Optional | Registry Format GUID = | When this element is present, the build process will be interrupte= d during the AutoGen stage in order to call an external program, named by G= UID that must also be defined in the Conf/tools_def.txt file using a tool c= ode name of VPDTOOL. Refer to the EDK II Build specification for additional= information. = | | `PCD_INFO_GENERATION` | Optional | TRUE or FALSE = | If present, and set to TRUE, this flag will generate PCD informati= on in the Pcd Database. = = = = | | `PCD_VAR_CHECK_GENERATION` | Optional | TRUE or FALSE = | If present and set to TRUE, this flag will generate the variable v= alidation table binary file in the build output FV floder. If not present r= o set to FALSE, then the binary file will not be generated. = = = | +| `PREBUILD` | Optional | String of script with argu= ments | If present, build tool will call the script of this statement to e= xecute. = = = = | +| `POSTBUILD` | Optional | String of script with argu= ments | If present, build tool will call the script of this statement to e= xecute. = = = = | =20 [^1]: WORKSPACE refers to the combination of the directories specified in = the WORKSPACE system environment variable and the PACKAGES_PATH system environ= ment variable. =20 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 fa6ee60..8950b80 100644 --- a/3_edk_ii_dsc_file_format/35_[defines]_section.md +++ b/3_edk_ii_dsc_file_format/35_[defines]_section.md @@ -123,12 +123,12 @@ The `!include` statement may be used in a `[Defines]`= section. [ "ISO_LANGUAGES" ] [ "TIME_STAMP_FILE" ] [ "VPD_TOOL_GUID" ] [ "PCD_VAR_CHECK_GENERATION" ] - [ "PREBUILD" {} {} = ] - [ "POSTBUILD" {} {}= ] + [ "PREBUILD"