On Fri, Sep 4, 2015 at 4:24 AM, anatoly techtonik <[email protected]> wrote:
> On Fri, Sep 4, 2015 at 10:10 AM, Dirk Bächle <[email protected]> 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
_______________________________________________ Scons-dev mailing list [email protected] https://pairlist2.pair.net/mailman/listinfo/scons-dev
