[Scons-users] creating custom builder

wiktor tomczak wiktor.tomczak at gmail.com
Thu Nov 8 06:43:58 EST 2012


Hi scons-users,

I'd like build file types not natively supported by SCons. If I understand
correctly, I should create my own builder. I have a few questions regarding
custom builders:

1. I'd like the builder to always produce a fixed set of files, eg. given a
source file foo, it should always produce target files foo_bar and foo_baz.
Ideally, these targets would be implicit, they wouldn't need to be listed
explicitly in targets (same way Program('hello.c') implicitly produces
hello). How can I do that?

2. I'd like the builder to take custom keyword arguments other than source
and target. Can I define the builder as a Python class that implements some
interface? Is there a Builder interface?

3. Per 1., I'd like the builder to produce a set heterogeneous files which
together form a single logical target. The builder could return a list of
Node objects, but that would lack structure. Can I encapsulate the list in
a custom class that represents the logical target and use that as builder's
return value?

thanks,

Wiktor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20121108/21f23a17/attachment.html>


More information about the Scons-users mailing list