[Scons-users] SCons stays in top-level directory or not?
Dan Pidcock
dan.pidcock at googlemail.com
Fri Feb 8 10:21:31 EST 2013
On 8 February 2013 13:28, Gary Oberbrunner <garyo at oberbrunner.com> wrote:
> SCons works in two phases. In the first, it reads all the SConscripts and
> builds the dependency graph. In the second, it builds whatever is needed by
> executing the graph. The file nodes in the graph know the full path to each
> file.
>
> In the first phase, reading the SConscripts, SCons changes into the dir of
> each SConscript (variant if that's enabled), so paths relative to the
> SConscript work (your "printing ." above). In the second (build) phase,
> SCons stays in the top dir and executes all commands with the proper paths
> from there.
>
> SCons can be made to cd into each target's dir before executing its
> command(s), but that's not recommended because it breaks parallel builds
> since any process can only have one current dir across all threads.
Ah that makes sense - thanks.
Dan
More information about the Scons-users
mailing list