summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Action.xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Action.xml')
-rw-r--r--src/engine/SCons/Action.xml107
1 files changed, 107 insertions, 0 deletions
diff --git a/src/engine/SCons/Action.xml b/src/engine/SCons/Action.xml
new file mode 100644
index 0000000..a4eb12d
--- /dev/null
+++ b/src/engine/SCons/Action.xml
@@ -0,0 +1,107 @@
+<!--
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
+
+This file is processed by the bin/SConsDoc.py module.
+See its __doc__ string for a discussion of the format.
+-->
+<cvar name="IMPLICIT_COMMAND_DEPENDENCIES">
+<summary>
+Controls whether or not SCons will
+add implicit dependencies for the commands
+executed to build targets.
+
+By default, SCons will add
+to each target
+an implicit dependency on the command
+represented by the first argument on any
+command line it executes.
+The specific file for the dependency is
+found by searching the
+<varname>PATH</varname>
+variable in the
+<varname>ENV</varname>
+environment used to execute the command.
+
+If the construction variable
+&cv-IMPLICIT_COMMAND_DEPENDENCIES;
+is set to a false value
+(<literal>None</literal>,
+<literal>False</literal>,
+<literal>0</literal>,
+etc.),
+then the implicit dependency will
+not be added to the targets
+built with that construction environment.
+
+<example>
+env = Environment(IMPLICIT_COMMAND_DEPENDENCIES = 0)
+</example>
+</summary>
+</cvar>
+
+<cvar name="PRINT_CMD_LINE_FUNC">
+<summary>
+A Python function used to print the command lines as they are executed
+(assuming command printing is not disabled by the
+<option>-q</option>
+or
+<option>-s</option>
+options or their equivalents).
+The function should take four arguments:
+<varname>s</varname>,
+the command being executed (a string),
+<varname>target</varname>,
+the target being built (file node, list, or string name(s)),
+<varname>source</varname>,
+the source(s) used (file node, list, or string name(s)), and
+<varname>env</varname>,
+the environment being used.
+
+The function must do the printing itself. The default implementation,
+used if this variable is not set or is None, is:
+<example>
+def print_cmd_line(s, target, source, env):
+ sys.stdout.write(s + "\n")
+</example>
+
+Here's an example of a more interesting function:
+
+<example>
+def print_cmd_line(s, target, source, env):
+ sys.stdout.write("Building %s -> %s...\n" %
+ (' and '.join([str(x) for x in source]),
+ ' and '.join([str(x) for x in target])))
+env=Environment(PRINT_CMD_LINE_FUNC=print_cmd_line)
+env.Program('foo', 'foo.c')
+</example>
+
+This just prints "Building <varname>targetname</varname> from <varname>sourcename</varname>..." instead
+of the actual commands.
+Such a function could also log the actual commands to a log file,
+for example.
+</summary>
+</cvar>
+
+<cvar name="SPAWN">
+<summary>
+A command interpreter function that will be called to execute command line
+strings. The function must expect the following arguments:
+
+<example>
+def spawn(shell, escape, cmd, args, env):
+</example>
+
+<varname>sh</varname>
+is a string naming the shell program to use.
+<varname>escape</varname>
+is a function that can be called to escape shell special characters in
+the command line.
+<varname>cmd</varname>
+is the path to the command to be executed.
+<varname>args</varname>
+is the arguments to the command.
+<varname>env</varname>
+is a dictionary of the environment variables
+in which the command should be executed.
+</summary>
+</cvar>