From 72c578fd4b0b4a5a43e18594339ac4ff26c376dc Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Sat, 2 Jan 2010 20:56:27 +0100 Subject: Imported Upstream version 1.2.0.d20091224 --- doc/user/actions.xml | 404 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 404 insertions(+) create mode 100644 doc/user/actions.xml (limited to 'doc/user/actions.xml') diff --git a/doc/user/actions.xml b/doc/user/actions.xml new file mode 100644 index 0000000..c3b8cf9 --- /dev/null +++ b/doc/user/actions.xml @@ -0,0 +1,404 @@ + + + + + + + &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 + + + +
+ + -- cgit v1.2.3