[Scons-users] Odd --tree output with out-of-source build

Mats Wichmann mats at wichmann.us
Fri Mar 18 09:50:45 EDT 2022


On 3/18/22 07:46, Hartmut Brandt wrote:

> MW>> which looks odd. Are out-of-tree builds not supported? Could not find
> MW>> such a hint in the documentation, but I could easily miss it.
> MW>
> MW>Supported, but this is a matter of target selection. SCons does not by
> MW>default select targets outside the tree, so in your out-of-tree
> MW>example,nothing in the variant dir is selected for building, so there's
> MW>nothing to report on there.
> MW>
> MW>https://scons.org/doc/production/HTML/scons-man.html#target_selection
> 
> So how do I specify these targets? I would assume I need to specify foo 
> with some path like /home/harti/build/play/sub1/foo or just the directories.
> None of this works. scons tells me either that it doesn't know how to 
> build it or it spits out a python error ('NoneType' object has no 
> attribute 'get_contents').

Hmmm, the path to the build directory should work. Perhaps the quickest
way is to use '/' as the target name.

scons --tree=prune /

should do what you want.



More information about the Scons-users mailing list