[Scons-users] Build Order

Dirk Bächle tshortik at gmx.de
Sun Jul 13 16:16:06 EDT 2014


On 13.07.2014 21:26, Russell, J.J. wrote:
> [...]
>
> Here is a rough outline.  In the C file is something that looks like
>
>     #include “test-pkg/platform/atomic_ops.h”
>
> The CPPPATH includes a reference to a directory that looks like
>
>        <platform-specific-stem>/inc/test-pkg/platform
>
> where platform is a symbolic link, that dependent on the target platform, points to one of a number of directories that contain platform dependent code, for example
>
>       <platform-specific-stem>/inc/test-pkg/platform ->  <project-stem>/test-pkg/inc/linux-x86_64  ..or..
>                                                                                      <project-stem>/test-pkg/inc/rtems-armCA9 … etc…
>
> (The platform selection is done when the user invokes scons.  The motivation for this is to keep the platform selection out of the C code avoiding the usual #ifdef preprocessor method, but instead using the include paths to do the steering and to keep the number of include paths to as few as possible. I think ‘boost’ attempts a similar tactic.)

This sounds as if you're searching for something like the Repository() 
method, please check the UserGuide, chap. 22 "Building From Code 
Repositories". It allows you to blend in (or kind of "mount") existing 
source trees to your current build...which might help to get rid of all 
the symbolic linking.

Dirk



More information about the Scons-users mailing list