[Scons-users] cache + sideeffect not working as expected ?

Julien Pommier pommier at pianoteq.com
Fri Dec 7 10:09:54 EST 2012


Dirk wrote :

> Some additional info about SideEffect: it is a method 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.


Thanks a lot for your explanation, Dirk, It looks like I did not
understand the purpose of the SideEffect command. It is now very clear ,
and


> env.Command(['foo','bar'], [], 'touch foo && touch bar')


is exactly what I was trying to achieve !

Julien


More information about the Scons-users mailing list