10.6 Post Build Processing
If the [Defines]
section of the DSC file contains a POSTBUILD = entry
statement, prior to exiting, the script specified in the POSTBUILD
statement
is executed. The entry of POSTBUILD
support multiple arguments. And Tool
will convert arguments that are WORKSPACE
or PACKAGES_PATH
relative paths
to absolute paths. If the script file is not found, the build command
exits with an appropriate error message. If the script fails, it must terminate
with a non-zero exit code and the build command terminates with the exit
value from the post-build script. The script is required to generate error
messages that provide the reason for the termination.
All of the command line options passed into the build command are also
passed into the script along with the options for TARGET
, ARCH
,
TOOL_CHAIN_TAG
, ACTIVE_PLATFORM
, Conf Directory
, and build target
.
If the script terminates successfully (exit value of 0), then the build command terminates normally.
Note: This entry may be wrapped in a conditional directive. Unlike the
PREBUILD
entry, there are no restrictions on the MACRO values used in a
conditional directive.
Note: Quotes are needed when the script's additional options are present. Quotes are also required if the path to the post-build command contains space or special characters. Quotes may be used for arguments that have spaces or special characters.