[Scons-users] Precious+NoClean vs SideEffect

Dirk Bächle tshortik at gmx.de
Mon Nov 12 11:09:57 EST 2012


Hi Mark,

the SideEffect method is reserved for the special case where your build
step emits not only the required target,
but also an additional file(s) which always carries the same name (e.g.
"default.h"), no matter how the names of your sources and targets look like.
When you wanted to use the "-j" option, this could lead to trouble if
several threads tried to create and write to the same file at once.
By marking the "default.h" as SideEffect(), SCons ensures that only one
thread creating/writing "default.h" can run at the same time.

In all other cases, a simple Clean/NoClean/Precious should be the
preferred method...

Hope this helps.

Best regards,

Dirk

On 12.11.2012 12:12, Mark Ribau wrote:

> Can anyone tell me some rules of thumb for when to use Precious with

> NoClean and when to use SideEffect? They seem to basically have the

> same effect in my experiments with them.

>

> The only major difference I can see is that SCons won't complain if

> multiple sources modify the same SideEffect? But that doesn't seem

> like the only difference, otherwise SideEffect seems like a weird

> name, so I am assuming I'm missing something.

> *

> *

> *

> *

> ----

> *mark ribau*

> *software engineer

> *

>

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users


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


More information about the Scons-users mailing list