[Scons-users] Builder object being called a large number of times and getting odd results
TOM TANNER (BLOOMBERG/ LONDON)
ttanner2 at bloomberg.net
Thu Aug 16 04:59:25 EDT 2012
addendum: If I use 'etc/*.mlst', rather than '#/etc/*.mlst', I get nothing returned on the fast pass (when using a repository), but the 2nd and subsequent calls produce the same results.
----- Original Message -----
From: garyo at oberbrunner.com
To: scons-users at scons.org, TOM TANNER (BLOOMBERG/ LONDON)
At: 8/15 19:01:21
On Wed, Aug 15, 2012 at 12:17 PM, TOM TANNER (BLOOMBERG/ LONDON)
<ttanner2 at bloomberg.net> wrote:
> 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
Hi Tom, not sure what's happening here. Can you send a complete
example so someone can try it out?
--
Gary
More information about the Scons-users
mailing list