[Scons-users] SCon example for common build scenario

Dirk Bächle tshortik at gmx.de
Mon Jun 16 11:56:19 EDT 2014


Hi Dan,

On 16.06.2014 13:37, Dan Pidcock wrote:
> Ronex,
>
> On 14 June 2014 16:07, ronex chako <ronex_89 at yahoo.in 
> <mailto:ronex_89 at yahoo.in>> wrote:
>
>     I know python, Although it is useful, But SCons has some
>     convenient methods that are specifically used for build, which I
>     am not actually much aware of.
>
>
> I have a simple test project that I use to try things out with SCons 
> and I have uploaded a version of it to 
> https://github.com/danio/scons-test. It is currently an app and a 
> dependent module, rather than your example of 2 modules but hopefully 
> it will give you an idea of how it is possible to do separate modules 
> with SCons. It does show you how to have debug/release variants with 
> the libraries build and installed into separate directory trees so you 
> don't have to rebuild when switching modes (which I think is a common 
> requirement for build systems). Note however that I'm quite new to 
> SCons (used on only one project for about 9 months) so I'm sure there 
> are better ways to do some of the things I have there and maybe other 
> members of the mailing list will point them out.
>

thanks for the nice example. I had a short look at it, and I think that 
it's a good start. Allow me one small remark though: I'm not a big fan 
of using absolute paths for specifying LIBPATH and CPPPATH, in 
connection with VariantDirs. By using relative paths like "../module1" 
you don't have to pass the current "build" dir down to your modules, and 
are much more flexible and robust against changes in the directory 
structure of your "src" tree.

Just my 2 cents.

Best regards,

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20140616/3c5308f9/attachment.html>


More information about the Scons-users mailing list