[Scons-users] Path expansion with multiple SConscripts

Eric Lunderberg eric.lunderberg at gmail.com
Thu Dec 8 20:00:11 EST 2016

I have something of a work-around at the moment.  Instead of using
env.Append(CPPPATH=['.']) or env.Append(CPPPATH=[Dir('.')]), I can use
env.Append(CPPPATH=[Dir('.').RDirs('.')]).  This forces the expansion of
'.' to be done immediately, while still in the bottom-level SConscript, and
expands to both the source directory and the variant directory.

Is there a way to set this as the default behavior from the top-level
SConstruct?  It seems like a bit of an awkward work-around at the moment,
needing to remember to do so in each SConscript.

On Mon, Dec 5, 2016 at 3:44 PM, Eric Lunderberg <eric.lunderberg at gmail.com>

> Hello,
> I believe I have run into a bug involving the include path generated for
> C++ compilation.  I am attempting to set up a modular SConstruct to compile
> multiple shared libraries, some of which depend on the others.  When a
> SConscript adds the current directory to the CPPPATH of a shared
> environment, the "." is expanded to the directory of the SConscript that
> defines a compilation rule, rather than the SConscript that appended to the
> This becomes an issue when using variant_dir and duplicate=False, because
> it becomes impossible to use the Dir('.') syntax to force an early
> expansion of the directory.  In this case, it resolves to a path to the
> variant_dir, rather than expanding to both the variant_dir and location of
> the SConscript, as usually happens when using duplicate=False.
> The directory structure, contents of the SConstruct and SConscript, and
> resulting error messages are shown here (http://pastebin.com/mpBWvEQG).
> A short discussion of this issue can be found here
> <http://stackoverflow.com/q/40424482/2689797> on stack overflow, where it
> was suggested that the bug report be brought to the mailing list.
> Thank you,
> Eric Lunderberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20161208/c3c946d4/attachment.html>

More information about the Scons-users mailing list