[Scons-users] Question on custom builder

Bill Deegan bill at baddogconsulting.com
Fri Dec 22 13:02:39 EST 2017


Can you share udb_precompile?
Also please share your emitter.

On Fri, Dec 22, 2017 at 8:45 AM, <syost at triad.rr.com> wrote:

> I have the following code
>
> myBld = Builder(action = udb_precompile,
>                 suffix='.c',
>                 src_suffix='.sc',
>                 emitter = udb_emitter)
> rootEnv.Append( BUILDERS = {'UDBPrep' : myBld } )
>
> I call it like so:
> newlyCreatedTargets = UDBPrep(Glob('*.sc'))
>
> The builder function simply calls a script with each source as a parameter
> and the emitter simply adds the secondary target that is also created
> ("*.bnd" suffix) by the script using target.append().  The target list ends
> up like this:
>
> source=[files.sc, file2.sc, file3.sc]
> target=[file1.c, file1.bnd, file2.bnd, file3,bnd]
>
> as you can see, I don't have all my *.c targets in the target list - just
> the first one (they do get created by the script).  If I call the builder
> individually for each source file it works perfect but I take a performance
> hit for this.  Any ideas?
>
> Thanks in advance!!!!
>
> Spencer
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20171222/1d25890e/attachment.html>


More information about the Scons-users mailing list