diff options
Diffstat (limited to 'src/engine/SCons/Action.xml')
-rw-r--r-- | src/engine/SCons/Action.xml | 57 |
1 files changed, 48 insertions, 9 deletions
diff --git a/src/engine/SCons/Action.xml b/src/engine/SCons/Action.xml index 3d1fda4..9c120e2 100644 --- a/src/engine/SCons/Action.xml +++ b/src/engine/SCons/Action.xml @@ -1,15 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> <!-- -Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation +Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation This file is processed by the bin/SConsDoc.py module. See its __doc__ string for a discussion of the format. --> + +<!DOCTYPE sconsdoc [ +<!ENTITY % scons SYSTEM '../../../doc/scons.mod'> +%scons; +<!ENTITY % builders-mod SYSTEM '../../../doc/generated/builders.mod'> +%builders-mod; +<!ENTITY % functions-mod SYSTEM '../../../doc/generated/functions.mod'> +%functions-mod; +<!ENTITY % tools-mod SYSTEM '../../../doc/generated/tools.mod'> +%tools-mod; +<!ENTITY % variables-mod SYSTEM '../../../doc/generated/variables.mod'> +%variables-mod; +]> + +<sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0/scons.xsd scons.xsd"> + <cvar name="IMPLICIT_COMMAND_DEPENDENCIES"> <summary> +<para> Controls whether or not SCons will add implicit dependencies for the commands executed to build targets. +</para> +<para> By default, SCons will add to each target an implicit dependency on the command @@ -21,7 +43,9 @@ found by searching the variable in the <varname>ENV</varname> environment used to execute the command. +</para> +<para> If the construction variable &cv-IMPLICIT_COMMAND_DEPENDENCIES; is set to a false value @@ -32,15 +56,17 @@ etc.), then the implicit dependency will not be added to the targets built with that construction environment. +</para> -<example> +<example_commands> env = Environment(IMPLICIT_COMMAND_DEPENDENCIES = 0) -</example> +</example_commands> </summary> </cvar> <cvar name="PRINT_CMD_LINE_FUNC"> <summary> +<para> A Python function used to print the command lines as they are executed (assuming command printing is not disabled by the <option>-q</option> @@ -56,41 +82,51 @@ the target being built (file node, list, or string name(s)), the source(s) used (file node, list, or string name(s)), and <varname>env</varname>, the environment being used. +</para> +<para> The function must do the printing itself. The default implementation, used if this variable is not set or is None, is: -<example> +</para> +<example_commands> def print_cmd_line(s, target, source, env): sys.stdout.write(s + "\n") -</example> +</example_commands> +<para> Here's an example of a more interesting function: +</para> -<example> +<example_commands> 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> +</example_commands> +<para> 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. +</para> </summary> </cvar> <cvar name="SPAWN"> <summary> +<para> A command interpreter function that will be called to execute command line strings. The function must expect the following arguments: +</para> -<example> +<example_commands> def spawn(shell, escape, cmd, args, env): -</example> +</example_commands> +<para> <varname>sh</varname> is a string naming the shell program to use. <varname>escape</varname> @@ -103,5 +139,8 @@ is the arguments to the command. <varname>env</varname> is a dictionary of the environment variables in which the command should be executed. +</para> </summary> </cvar> + +</sconsdoc>
\ No newline at end of file |