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 3090F21E3EA7C for ; Sun, 3 Sep 2017 22:08:34 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2017 22:11:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,473,1498546800"; d="scan'208";a="147170230" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga005.fm.intel.com with ESMTP; 03 Sep 2017 22:11:21 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 3 Sep 2017 22:11:21 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 3 Sep 2017 22:11:20 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.39]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.219]) with mapi id 14.03.0319.002; Mon, 4 Sep 2017 13:11:18 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Shaw, Kevin W" Thread-Topic: [Patch] DSC Spec: Add multi-arg support to PREBUILD/POSTBUILD Thread-Index: AQHTIW6C3m2zd4wVdUy1KXgd1kord6KkNZcQ Date: Mon, 4 Sep 2017 05:11:17 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D788268@shsmsx102.ccr.corp.intel.com> References: <1504083637-1276-1-git-send-email-yonghong.zhu@intel.com> <1504083637-1276-2-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1504083637-1276-2-git-send-email-yonghong.zhu@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: [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: , X-List-Received-Date: Mon, 04 Sep 2017 05:08:34 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Zhu, Yonghong >Sent: Wednesday, August 30, 2017 5:01 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming ; Kinney, Michael D >; Shaw, Kevin W >Subject: [Patch] DSC Spec: Add multi-arg support to PREBUILD/POSTBUILD > >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 >--- > 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_overview/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: > > `Name =3D 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 th= e >DSC >-file if the `PREBUILD` entry is present, calls the script, and either ter= minates >-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 scri= pt, >-otherwise, `build` terminates normally. The author of the script is respo= nsible >-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 >arguments >+that have spaces or special characters. The `build` tool suspends process= ing >of >+the DSC file if the `PREBUILD` entry is present, calls the script, and ei= ther >+terminates or continues processing the DSC file depending on the exit cod= e >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). > >@@ -114,10 +118,12 @@ item is required. > | `RFC_LANGUAGES` | Optional | RFC4646 Language code lis= t | A >semi-colon ";" separated list of RFC4646 Language codes (EDK II Modules) >used during the generation of only a set, rather than all, UNICODE languag= es >during the StrGather AutoGen phase. The list must be encapsulated in doubl= e >quotes. >| > | `ISO_LANGUAGES` | Optional | ISO-639-2 Language code l= ist | 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 >encapsulated in double quotes. >| > | `VPD_TOOL_GUID` | Optional | Registry Format GUID = | When >this element is present, the build process will be interrupted during the >AutoGen stage in order to call an external program, named by GUID that mus= t >also be defined in the Conf/tools_def.txt file using a tool code name of >VPDTOOL. Refer to the EDK II Build specification for additional informatio= n. >| > | `PCD_INFO_GENERATION` | Optional | TRUE or FALSE = | If >present, and set to TRUE, this flag will generate PCD information in the P= cd >Database. >| > | `PCD_VAR_CHECK_GENERATION` | Optional | TRUE or FALSE = | >If present and set to TRUE, this flag will generate the variable validatio= n table >binary file in the build output FV floder. If not present ro set to FALSE,= then >the binary file will not be generated. >| >+| `PREBUILD` | Optional | String of script with arg= uments | If >present, build tool will call the script of this statement to execute. >| >+| `POSTBUILD` | Optional | String of script with arg= uments | If >present, build tool will call the script of this statement to execute. >| > > [^1]: WORKSPACE refers to the combination of the directories specified in= the > WORKSPACE system environment variable and the PACKAGES_PATH system >environment > variable. > >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 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"