[Scons-dev] Likely bug - installing side effect files

Dirk Bächle tshortik at gmx.de
Fri Oct 31 15:20:32 EDT 2014


On 31.10.2014 20:04, Gary Oberbrunner wrote:
> On Fri, Oct 31, 2014 at 2:55 PM, Dirk Bächle <tshortik at gmx.de> wrote:
>> I don't think there is anything to fix here...and it's no bug for me either.
>> Please read the man page for the definition
>> of a SideEffect, and when it should be used. My understanding is, that in
>> your case the conditions do not apply...so you should rather define an
>> Emitter (see http://www.scons.org/wiki/ToolsForFools for example) that adds
>> "sf0" and "sf1" to the list of targets.
>> Then the Install() should work as expected.
> I disagree.  He's explicitly passing the files in sf to Install();
> Install() should always (try to) install all the files given as its
> sources.  Whether they're created as side effects or anything else
> _shouldn't_ matter.
>
Hmm, do you mean "all files" or "all targets"? I really don't regard 
SideEffects to be full targets...but maybe I'm overlooking something. 
I'm just thinking about the case where I use a "foo" compiler. It always 
creates a file "named.fix", containing some internal info that's input 
for the build step itself.
So, for scheduling single builds with this compiler correctly, in 
concurrency speak: locking it with a kind of monitor for parallel mode, 
I define the file "named.fix" as SideEffect in my "foo" Builder.
If I then say something like:

   env = Environment(tools=['foo'])
   a = env.Foo('a.foo','a.in')
   b = env.Foo('b.foo','b.in')

   env.Install('/install', [a, b, 'named.fix'])

which version of "named.fix" gets installed? Which version *should* get 
installed? And is the intended ordering guaranteed for any invocation of 
"-j n"?
You're probably right, but the above is what's rolling through my head 
right now...all kinds of clarifications and comments are welcome. ;)

Dirk



More information about the Scons-dev mailing list