[Scons-users] find new targets from other targets?

Scott Johnson scott.johnson at arilinc.com
Wed Feb 19 21:04:20 EST 2020


I’m new to SCons. Trying to use SCons to build a bunch of Verilog source files by preprocessing them with Jinja.

I start with one file, top.F.jinja, that looks like so:

tgt1.v
-F pkg1.F
{% if some_condition %}
-F pkg2.F
{% endif %}


So I need to run this through Jinja to build top.F, then parse the generated top.F to find additional targets recursively. In this case I also need to build tgt1.v, pkg1.F (recursively parsing it too for additional targets), and possibly pkg2.F.

Is it possible to add additional targets to the DAG like this after the build has started running? The Pseudo Code of the SconsProcessOverview[1] suggests that it is not possible...

Gnu Make can (kinda) handle this by writing the additional targets to a *.d file, then including that file. Make will restart after building the *.d files, and then build the new targets.


[1] https://github.com/SCons/scons/wiki/SconsProcessOverview


More information about the Scons-users mailing list