[Scons-users] Get list of executed command lines

Remko Tronçon remko at el-tramo.be
Mon Dec 24 04:16:41 EST 2012


Hi all,

Is it possible to get a list of all (actual, or theoretical) executed
command lines out of a SCons build? After I did a SCons build, I would
like to have all C/C++ compiler execution lines for all my source
files (the other command lines don't interest me), so
gcc -o foo.o -c foo.c
gcc -o bar.o -c bar.c
...
(in one form or another).

The naive way would be to do dump SCons' output to a file, and write a
script to parse the output and try to detect compiler invocations, but
it would be a lot easier if I could do this in SCons itself (e.g. by
introspection, or by overriding some execution function to also log
commands to a variable).

Ideally, I would have the list of all compilation lines, including
those that aren't executed (because the sources didn't change), but I
can live with just the actual compilation lines as well, and doing a
clean build everytime.

thanks!
Remko


More information about the Scons-users mailing list