[Scons-users] Passing Options that contain filename to default Builders

lada-s at gamers-area.net lada-s at gamers-area.net
Mon May 23 02:46:16 EDT 2016


Hello scons-users,

I am working on porting a Make buildsystem originated project based on GNU ARM GCC to scons, but I am struggling with options that need information about the item built.

The one example:
Gcc has the options -M <filename> that are there for generating additional information about the build to a file. In Make I used following command: -MF"$(@:%.o=%.d)" which takes the build target name and replaces the postfix .o with .d to write dependencies to it.

So gcc -MF"$(@:%.o=%.d)" test.c returned files test.o and test.d.

The questions:
How can I do this with SCons without writing a dedicated Builder?
Are the $TARGET, $SOURCE replacements working within Object builder?

BR /Stefan


More information about the Scons-users mailing list