[Scons-dev] How to traverse the graph after files are read

Gary Oberbrunner garyo at oberbrunner.com
Wed May 20 08:36:00 EDT 2015


On Wed, May 20, 2015 at 6:43 AM, anatoly techtonik <techtonik at gmail.com>
wrote:

> The confusing part is that
> node graph is derived from filesystem.
>

FS represents the filesystem, both on disk and what will exist once all
targets are built.

I didn't say start from the filesystem, I said start from your target(s).

myprog=Program(...)
...
# at end of SConstruct:
visit_node_sources_recursively(myprog)

you just have to write visit_node_sources_recursively, following each
node's .sources list.  myprog is a File node (actually a list of those).
Nowhere should you need FS.


-- 
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20150520/2ffb133e/attachment.html>


More information about the Scons-dev mailing list