[Scons-dev] SCons Node ID

Gary Oberbrunner garyo at oberbrunner.com
Fri Sep 4 06:48:41 EDT 2015


On Fri, Sep 4, 2015 at 4:24 AM, anatoly techtonik <techtonik at gmail.com>
wrote:

> On Fri, Sep 4, 2015 at 10:10 AM, Dirk Bächle <tshortik at gmx.de> wrote:
>
>> On 04.09.2015 06:16, anatoly techtonik wrote:
>>
>>> I have another question about SCons. If I specify target explicitly, it
>>> ends up
>>> as str in BUILD_TARGETS and it is impossible to traverse. How do I
>>> transform it to Node if I don't know the type? I.e. how to lookup Node
>>> object
>>> by name?
>>>
>>>
>> you mean you explicitly specify a target "x" on the command line, but you
>> don't know whether it's a File or a Dir?
>> Can you come up with a short user scenario for this? What is it that
>> you're trying to accomplish?
>>
>
> The short user scenario - a person want to build wesnoth and executes
> `scons`. The output says that possible targets are "wesnoth" and
> "wesnothd". Because I don't have dependencies for "wesnoth", I specify
> "wesnothd" which ends up as str in BUILD_TARGETS and I can not traverse it.
>

Normally you just say e = Entry(str), which converts the string to an
Entry, which is a Node whose type is unknown.  At various points Entry
nodes are converted to their correct type once it can be deduced

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


More information about the Scons-dev mailing list