[Scons-users] nested variant directories

Karl Ostmo kostmo at gmail.com
Tue Jul 15 15:55:05 EDT 2014


Let's say there is an application with multiple dimensions of
configuration.  We would like to create a variant directory for each unique
configuration.  Say the outer dimensions is of colors: "red", "yellow",
"blue", and the inner dimension is height: "low", "high", so that there are
six possible configurations.

What is the preferred way to structure the variant directories?  My
approach has been as follows:

* Have a toplevel "SConstruct" file with a loop that iterates over each
color, making a call to SConscript("SConscript-color",
variant_dir=color_name)
* Have an intermediate "SConscript-color" file, where all of the build
steps that are specific to color are contained.  It loops over each
"height" setting, making a call to SConscript("SConscript-height",
variant_dir=height_name)
* Have an inner "SConscript-height" file, where all of the build steps that
are specific to height are contained.

This has the effect of placing build artifacts into six nested variant
directories:
red/low
red/high
yellow/low
yellow/high
blue/low
blue/high

This works well, except for when I want to print out the dependency tree
via "--dry-run --tree=prune".  Then a warning is printed:
scons: warning: Ignoring missing SConscript

I guess it can't find the inner SConscript-height file within the variant
directory.  It is not a problem when the "--dry-run" options is not used.

Karl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20140715/da672a21/attachment.html>


More information about the Scons-users mailing list