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 --- src/engine/SCons/Action.xml | 107 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 src/engine/SCons/Action.xml (limited to 'src/engine/SCons/Action.xml') 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 @@ + + + +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 +PATH +variable in the +ENV +environment used to execute the command. + +If the construction variable +&cv-IMPLICIT_COMMAND_DEPENDENCIES; +is set to a false value +(None, +False, +0, +etc.), +then the implicit dependency will +not be added to the targets +built with that construction environment. + + +env = Environment(IMPLICIT_COMMAND_DEPENDENCIES = 0) + + + + + + +A Python function used to print the command lines as they are executed +(assuming command printing is not disabled by the + +or + +options or their equivalents). +The function should take four arguments: +s, +the command being executed (a string), +target, +the target being built (file node, list, or string name(s)), +source, +the source(s) used (file node, list, or string name(s)), and +env, +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: + +def print_cmd_line(s, target, source, env): + sys.stdout.write(s + "\n") + + +Here's an example of a more interesting function: + + +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') + + +This just prints "Building targetname from sourcename..." instead +of the actual commands. +Such a function could also log the actual commands to a log file, +for example. + + + + + +A command interpreter function that will be called to execute command line +strings. The function must expect the following arguments: + + +def spawn(shell, escape, cmd, args, env): + + +sh +is a string naming the shell program to use. +escape +is a function that can be called to escape shell special characters in +the command line. +cmd +is the path to the command to be executed. +args +is the arguments to the command. +env +is a dictionary of the environment variables +in which the command should be executed. + + -- cgit v1.2.3