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

Mats Wichmann mats at wichmann.us
Fri Feb 21 19:46:35 EST 2020


On 2/19/20 7:04 PM, Scott Johnson wrote:
> 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.

I'm a little slow, there's Jinja and Ninja, and people have asked about
both recently so I didn't pay attention to this one.  This note is only
to point out someone has built a tool which aids in the use of Jinja for
templating, it's on the SCons tool page, but more directly it's here -
no idea if this helps or not:

https://github.com/hgomersall/scons-jinja


More information about the Scons-users mailing list