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

anatoly techtonik techtonik at gmail.com
Wed May 20 11:25:44 EDT 2015


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

I want to get target Node based on name passed from command line.
How to do that?

If there is no name, how do I find default node to start from? From what I
see in Main.py, I have only fs object at my disposal.

-- 
anatoly t.


More information about the Scons-dev mailing list