[Scons-dev] How to traverse the graph after files are read
Dirk Bächle
tshortik at gmx.de
Wed May 20 03:26:31 EDT 2015
Hi all,
On 20.05.2015 09:01, anatoly techtonik wrote:
> On Tue, May 19, 2015 at 3:19 PM, Gary Oberbrunner <garyo at oberbrunner.com> wrote:
>> At the end of your SConstruct, start with the target nodes and recurse into
>> each node.sources .
the "recurse into" is what's important here, Anatoly.
>> [...]
>
> But the logic what happens here and how FS object is transformed
> into DAG, escapes me.
There is no real DAG stored anywhere within the code, like an object that you can grab and visit its attributes or traverses its nodes.
With the call
else:
# Build the targets
nodes = _build_targets(fs, options, targets, target_top)
if not nodes:
SCons starts to dynamically expand the list of children for each given target (which includes the so-far detected children of other
targets as well). So I don't think that you will get at what you actually want...but you can try to do a "recursion" light as Gary
suggested.
Best regards,
Dirk
More information about the Scons-dev
mailing list