[Scons-users] SCons.Node.Python.Value on target_factory
Philipp Kraus
philipp.kraus at flashpixx.de
Mon Apr 8 13:49:49 EDT 2013
Am 08.04.2013 um 18:56 schrieb Dirk Bächle:
> Hi Philipp,
>
> On 08.04.2013 12:00, Philipp Kraus wrote:
>>
>> Am 08.04.2013 um 07:33 schrieb Gary Oberbrunner:
>>
>>> [...]
>>>
>>>
>>> I try to understand why primary file nodes used by scons, I think I see the build process more theoretically but Scons do it more practical, seems to be a mistake myself. Scons seems to work on physical existing file & dir nodes, so a creating of a pseudo node or URL node is very difficult, because the core for building must be changed.
>>>
>
> the SCons core works on Nodes (which can be anything, files, dirs,...)...but most of the wrapper functions that are aiming at being convenient for the standard user, assume that a file/dir node is what everybody wants. And they do this because it is, in fact, what the majority of our users want and need. Compiling and building things, based on files and directories.
> Unfortunately, you don't seem to belong to this large group...and have to live with slight inconveniences here and there. One of them follows below...
Okay, so can I create my own node type eg my URL-Node, which can process in the default Scons structure?
Is there any full documentation? I have found only the class description, without any additional information eg how the objects are handle by the core functions.
>
>>> For my example I expect, that a node, which is a Python.Value also build by default like a file node.
>
> As Gary already pointed out, this expectation is wrong. If you want anything else but the '.' Dir node and its children to get built by default, you'll have to rearrange the dependency graph, such that your target is the child of another target (SCons will then update/build your target, because the other node depends on it). Another option is to use the Default() method, as described in the UserGuide (chap. 10.3.2 "Controlling the Default Targets: The Default Function"). There is also an AlwaysBuild() method, for requested targets that should always be considered as out-of-date...
Yes I know the calls, but if I can create my URL-Node, so I can set it to "always" build by default.
Thanks
Phil
More information about the Scons-users
mailing list