The rules and macros described below are used to update source files from output files.
On this page:
updatesrc_update(name, deps, outs, srcs)
Updates the source files in the workspace directory using the specified output files.
There are two ways to specify the update mapping for this rule.
Option #1: You can specify a list of source files and output files using the srcs
and outs
attributes, respectively. The source file at index 'n' in the srcs
list will be updated by the output file at index 'n' in the outs
list.
Option #2: Rules that provide UpdateSrcsInfo
can be specified in the deps
attribute.
ATTRIBUTES
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | A unique name for this target. | Name | required | |
deps | Build targets that output UpdateSrcsInfo . |
List of labels | optional | [] |
outs | Output files that will be used to update the files listed in the srcs attribute. Every file listed in the outs attribute must have a corresponding source file list in the srcs attribute. |
List of labels | optional | [] |
srcs | Source files that will be updated by the files listed in the outs attribute. Every file listed in the srcs attribute must have a corresponding output file listed in the outs attribute. |
List of labels | optional | [] |
updatesrc_update_all(name, targets_to_run)
Defines a runnable target that will query for updatesrc_update
targets and run them.
The utility queries for all of the updatesrc_update
rules in the
workspace and executes each one. Hence, source files that are mapped
in these targets will be updated.
Additional targets to execute can be specified using the targets_to_run
attribute.
PARAMETERS
Name | Description | Default Value |
---|---|---|
name | The name of the target. | none |
targets_to_run | A list of labels to execute in addition to the updatesrc_update targets. |
[] |
RETURNS
None.