[Scons-users] Builder object being called a large number of times and getting odd results
TOM TANNER (BLOOMBERG/ LONDON)
ttanner2 at bloomberg.net
Wed Aug 15 12:17:28 EDT 2012
I was trying to fiddle with one of my builders in a SConscript file, and I added some trace to it.
It's called (a bit hackily) like this
Import('*')
(gets a Cloned environment)
def _generator(...):
print for_signature, Glob('stuff/*.mlst', string=True)
return [ ... ]
bld = Builder(generator = _generator)
env['BUILDERS']['FooBar'] = bld
env.FooBar([target1, target2], [ source1, source2 ])
The builder gets called *eight* times each with for_signature set to 1.
The first time it gets caled, Glob() behaves very strangely, returning me a list of files that exist in the repository BUT with the path to the version where the build targets would exist.
Thus in the repository (path /my/source), there is a file called stuff/fred.mlst
I build in /my/source/aix/64/stuff/fred.mlst
the first time my function gets called, it prints /my/source/aix/64. The other 7 times, it prints stuff/fred.mlst
More information about the Scons-users
mailing list