[Scons-users] Fwd: Cleaning only certain built objects

Dirk Bächle tshortik at gmx.de
Fri Nov 14 10:09:38 EST 2014


Jean,

On 14.11.2014 15:45, Jean Duthon wrote:
> Hello Dirk,
>
> The problem is that to run tests, I need to build a lib.
> And I would like to be able to clean the tests, without cleaning the lib.
>
thanks for the clarification, it wasn't that obvious to me that your 
libs are real dependencies to your test executables. In that case, SCons 
is doing what is usually expected...and deliberately breaking its 
default behaviour is a bad thing, and means a lot of work. ;)

One could raise the question "Why do you want to delete the test 
applications at all?". My guess is that you're trying to enforce a 
re-run of all tests...even if no sources/libs have changed. Is that 
correct? If so, a better approach would be to have different SConstructs 
for the sources/libs and the tests themselves.
Like this, the "test" SConstructs see the libs as simple source files, 
so they won't get removed on a "scons -f SConstruct.test -c".

Regards,

Dirk



More information about the Scons-users mailing list