From b720f80c999f21e6de7406fe53bcde5d5b4ecc32 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 21 Nov 2021 07:31:24 -0700 Subject: [PR #4064] updated for_signature doc after review [ci skip] Signed-off-by: Mats Wichmann --- doc/man/scons.xml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index e5fd5bd22..4fa6e2767 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -6706,7 +6706,7 @@ to enclose a Python expression to be evaluated. See below for a description. -The special pseudo-variables +The special escape sequences $( and $) @@ -6721,7 +6721,7 @@ All text between and $) will be removed from the command line -before it is added to file signatures, +before it is added to the action signature, and the $( and @@ -6745,9 +6745,10 @@ echo Last build occurred $TODAY. > $TARGET echo Last build occurred . > $TARGET -A variable name may also be the name -of a &consvar; which refers to a &Python; function -called to perform the variable substitution. +While &consvars; are normally directly substituted, +if a variable refers to a &consvar; +whose value is a &Python; function, +that function is called during substitution. Such a function must accept four arguments: target, source, @@ -6768,7 +6769,7 @@ above) if for_signature is true. -SCons will insert whatever +&SCons; will insert whatever the called function returns into the expanded string: @@ -6781,7 +6782,7 @@ def foo(target, source, env, for_signature): env = Environment(FOO=foo, BAR="$FOO baz") -As a reminder, substitution evaluation happens when +As a reminder, substitution happens when $BAR is actually used in a builder action. The value of env['BAR'] will be exactly as it was set: "$FOO baz". -- cgit v1.2.1