[Scons-users] find new targets from other targets?
Paweł Tomulik
ptomulik at meil.pw.edu.pl
Thu Feb 20 07:18:33 EST 2020
W dniu 20.02.2020 o 03:04, Scott Johnson pisze:
> 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.
>
Looks like a perfect job for a scanner.
https://scons.org/doc/production/HTML/scons-user.html#chap-scanners
--
Paweł Tomulik
Instytut Techniki Lotniczej i Mechaniki Stosowanej
Politechnika Warszawska
pok. 204, tel. +48 22 234 5722
More information about the Scons-users
mailing list