[Scons-users] Builder
Dirk Bächle
tshortik at gmx.de
Wed Nov 27 18:10:15 EST 2013
Neven,
On 27.11.2013 21:45, Neven Klacar wrote:
> The use case is to take a source c file, pass it to my builder, and my
> builder will then pass it on to another builder which will pre-process
> the file using a pre-processor which will create a new c file.
> After this I will run a python script to replace certain tags in the
> new file. Once finished my builder will return and the newly created
> file is sent to Env.Object.
>
> So flow is src file a.c -> My builder -> PreProcess(target, src)
> My emitter modifies the target file to be a_altered.c
>
when defining a Builder, you can also use a list of Actions for the
"action=" parameter.
If you can get at the underlying command of the PreProcess() Builder you
want to use, you should be able to chain all the required steps in a
single Builder.
See also the thread at
http://scons.tigris.org/ds/viewMessage.do?dsForumId=1272&dsMessageId=383331
.
Before you start to implement your own text replacement Builder, you
might want to have a look at
http://www.scons.org/wiki/SubstInFileBuilder
http://www.scons.org/wiki/SubstInFileBuilder2
http://www.scons.org/wiki/GenericSubstBuilder
Does this help?
Regards,
Dirk
More information about the Scons-users
mailing list