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

anatoly techtonik techtonik at gmail.com
Wed May 20 09:47:20 EDT 2015


On Wed, May 20, 2015 at 3:36 PM, Gary Oberbrunner <garyo at oberbrunner.com> wrote:
> 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.

Are there two separate FS objects for that?

> 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.

First, I don't need to do this from SConstruct. I am looking how to add new
debug option to scons itself.

So, there is no graph I can dump? Just a list of targets that are being
traversed using sources? If so, then that means that every target should
be a filesystem object?

What is target then? If it is a name, how a lookup if made to locate it in
FS tree?
-- 
anatoly t.


More information about the Scons-dev mailing list