[Scons-users] Problem with custom builder

Dirk Bächle tshortik at gmx.de
Fri Jul 26 17:36:35 EDT 2013

Hi Michael,

it seems as if you're almost there.

On 26.07.2013 22:52, Michael Pock wrote:

> Hi,


> I'd like to implement a builder that takes source directories dir.a,

> dir.b and dir.c, and pipes their contents to target files dir.a.list,

> dir.b.list and dir.c.list. I've already tried the following:


> env = Environment()


> env["BUILDERS"]["List"] = Builder(action="ls ${SOURCE} >${TARGET}",

> suffix="list" ,

> source_factory=Dir ,

> single_source=True )


> env.List(["dir.a", "dir.b", "dir.c"])


> Unfortunately, this doesn't work since the directory suffix is

> stripped when computing the target filename. Hence, the target

> filename is dir.list for all source directories dir.a, dir.b and dir.c.


> I hoped that passing source_suffix=None or source_suffix="" to the

> Builder function would solve my problem. But these options seem to

> make no difference.

Please try


instead, and the correct name for the other parameter is "src_suffix".
You can find some more info about this in the MAN page (section
"Examples"/"Defining Your Own Builder Object").

Does this help already?

Best regards,


More information about the Scons-users mailing list