The rules and macros described below are used to update source files from output files.
On this page:
updatesrc_update(name, deps, srcs, outs)
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 | [] |
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 | [] |
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 | [] |
updatesrc_diff_and_update(srcs, outs, name, update_name, diff_test_prefix, diff_test_suffix, update_visibility, diff_test_visibility, kwargs)
Defines an updatesrc_update
for the package and diff_test
targets for each src-out pair.
PARAMETERS
updatesrc_update_all(name, targets_to_run, targets_to_run_before)
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
and targets_to_run_before
attributes.
PARAMETERS
RETURNS
None.