If you want to just do a build where the build artifacts don't
pollute the source directory, the repository mechanism can help with that.
Here's an example: checkout or unpack your project in the
directory src
,
and then build it in build
:
$mkdir build
$cd build
$scons -Q -Y ../src
gcc -o foo.o -I. -I/path/to/src -c /path/to/src/foo.c gcc -o foo foo.o $ls
foo foo.o
It can become awkward to keep having to type
-Y path-to-repo
repeatedly.
If so, the option can be placed in SCONSFLAGS
.