[Scons-users] Print all known commands (without executing them)?

Dirk Bächle tshortik at gmx.de
Mon Sep 17 16:25:22 EDT 2012


Hi Johan,

On 17.09.2012 21:32, Johan Holmberg wrote:

> Hi!

>

> I wonder if it is possible to print all "commands" known by SCons,

> without executing them? Say I have a SConstruct file like:

>

> e = Environment(CFLAGS='-Wall')

> e.Program('foobar', ['foo.c', 'bar.c'])

>

> Then I would like to get a list like:

>

> gcc -o bar.o -c -Wall bar.c

> gcc -o foo.o -c -Wall foo.c

> gcc -o foobar foo.o bar.o

>

> I don't care about the order of the commands. Just a list of all

> commands that SCons at some point might want to run (based on the

> SConstruct read).

>

> And I don't want to actually execute the commands. For a larger

> project this might take a long time, and I would like to get the list

> immediately.

>

> Is this possible?


yes it is. Opening SCons' Man page and searching for a keyword like
"execute" would lead you to the '-n' command line option, which is
pretty much doing what you want.

Best regards,

Dirk




More information about the Scons-users mailing list