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

Gary Oberbrunner garyo at oberbrunner.com
Wed May 20 10:46:52 EDT 2015


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

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

Every target (and source, and intermediate) is a Node.  The Node object
knows everything about that node, including name, path, parent, sources,
builder, build state, and so on.  There is no "lookup" in the sense you're
talking about.

If you want to get the Node object corresponding to a filename, just call
f=File("myfile") or f=File("/a/b/c/myfile") etc.

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


More information about the Scons-dev mailing list