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

anatoly techtonik techtonik at gmail.com
Wed May 20 14:31:16 EDT 2015


On Wed, May 20, 2015 at 6:51 PM, Kenny, Jason L <jason.l.kenny at intel.com> wrote:

> [...]

Thanks for the explanation. I wrote it down to ask questions later
when I get some output with the tree.

> To get the tree you want all you have to do is grab the target list ie... SCons.Script.BUILD_TARGETS and for each item in the list, turn it into a node ( as it might be a string still) and then you start to iterate it children. As pointed out the main code for this in SCons.Script.Main.py. you can look at TreePrinter as a starting point and search for the code that uses it.

I inserted "print SCons.Script.BUILD_TARGETS" right before checking
condition for interactive mode after SConscript files are read), and
it is empty. But SCons is still trying to build something. How it
determines those targets?

-- 
anatoly t.


More information about the Scons-dev mailing list