syntax for target filtering dependencies?
The README says: "Targets are flags that can be used to filter source files and dependencies." I can't seem to figure out the syntax for target-based filtering of dependencies. I couldn't find any examples online either. Thanks for any help.
Targets can be specified in the Bender.yml with source file groups, as shown in the Readme. To specify these targets for your scripts generation, add a --target <YOUR_TARGET> or -t <YOUR_TARGET> to your command. As an example, specifying the test target for a vsim script works as follows:
bender script vsim --target test
More info can be found in bender's help menu with bender script --help.
If you're looking for an example, check out cheshire's Bender.yml and Makefile
Thanks for getting back to me. I'm aware that targets can be specified in source groups. My question is, can targets also be used in the dependencies section of Bender.yml? The README says that target flags can be used to filter dependencies, not just source files.
I'm looking for something along these lines:
dependencies:
...
vs0: {target: vivado, path: "../../components/vs0_empty"}
vs0: {target: verilator, path: "../../components/vs0_stub"}
The above syntax does not work. I'm looking for the correct syntax (if there is one).
it seems, now, you can list all the targets after '-t/--target' (one with each) while do bender script
Filtering dependencies with targets is currently not supported, and will be difficult to support to properly construct the dependency tree. You can exclude individual dependencies (and their exclusive dependents) in the script and sources commands with the -e/--exclude <dep> flag. Future features may add target filtering ability for dependencies similar to what you are proposing, although this will also still only apply with the sources and script commands that pass targets, not when updating the dependency tree.