%scons; %builders-mod; %functions-mod; %tools-mod; %variables-mod; ]> &SCons; Actions &SCons; supports several types of &build_actions; that can be performed to build one or more target files. Usually, a &build_action; is a command-line string that invokes an external command. A build action can also be an external command specified as a list of arguments, or even a Python function. Build action objects are created by the &Action; function. This function is, in fact, what &SCons; uses to interpret the &action; keyword argument when you call the &Builder; function. So the following line that creates a simple Builder: b = Builder(action = 'build < $SOURCE > $TARGET') Is equivalent to: b = Builder(action = Action('build < $SOURCE > $TARGET')) The advantage of using the &Action; function directly is that it can take a number of additional options to modify the action's behavior in many useful ways.
Command Strings as Actions
Suppressing Command-Line Printing XXX
Ignoring Exit Status XXX
Argument Lists as Actions XXX
Python Functions as Actions XXX
Modifying How an Action is Printed
XXX: the &strfunction; keyword argument XXX
XXX: the &cmdstr; keyword argument XXX
Making an Action Depend on Variable Contents: the &varlist; keyword argument XXX
chdir=1 XXX
Batch Building of Multiple Targets from Separate Sources: the &batch_key; keyword argument XXX
Manipulating the Exit Status of an Action: the &exitstatfunc; keyword argument XXX