[Scons-users] Building from higher level directory

William Blevins wblevins001 at gmail.com
Wed Jun 1 07:58:46 EDT 2016


Herman,

The default target is the current directory ("."), so you are changing the
target. SCons will build all targets in that directory tree. Unlike Make,
SCons deals in targets and not sources.

V/R,
William

On Wed, Jun 1, 2016 at 11:51 AM, Herman Reintke <hreintke at tauri.nl> wrote:

> Hi,
>
> It is a beginners question but did not find an answer using search.
> First trying to understand the concepts before using in large projects.
>
> For testing I have the following directory/file structure
>
> - projects
> --projects\test
> --projects\test\hello.c
> --projects\test\tst
> --projects\test\tst\test.c
>
> In the projects\test\tst directory I have the sconstruct file :
>
> import os
> env = Environment(tools=['mingw'])
> env.Program('..\\hello.c')
> env.Program('test.c')
> env.Replace(
>  ENV = {'PATH' : os.environ['PATH']}
> )
> print "BUILD_TARGETS is", map(str, BUILD_TARGETS)
> #print env.Dump()
>
> I expected to build both hello & test programs but..
>
> When I execute "scons" in the projects\test\tst directory it is only
> building test
> When I execute "scons ..\\" in the projects\test\tst directory it is
> building both test & hello
>
> Can you give me a hint why this is or point me to the documentation to
> read ?
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160601/d4a9e4b5/attachment.html>


More information about the Scons-users mailing list