diff options
author | Mats Wichmann <mats@linux.com> | 2021-11-21 07:31:24 -0700 |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2021-11-21 07:31:24 -0700 |
commit | b720f80c999f21e6de7406fe53bcde5d5b4ecc32 (patch) | |
tree | d3ac34c3a88acde26aa74fb37c3e0c6126fc6bef | |
parent | 2936910a440633c465a42339a6df2757a7ed1c46 (diff) | |
download | scons-git-b720f80c999f21e6de7406fe53bcde5d5b4ecc32.tar.gz |
[PR #4064] updated for_signature doc after review [ci skip]
Signed-off-by: Mats Wichmann <mats@linux.com>
-rw-r--r-- | doc/man/scons.xml | 15 |
1 files 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 <xref linkend='python_code_substitution'/> below for a description.</para> -<para>The special pseudo-variables +<para>The special escape sequences <emphasis role="bold">$(</emphasis> and <emphasis role="bold">$)</emphasis> @@ -6721,7 +6721,7 @@ All text between and <emphasis role="bold">$)</emphasis> will be removed from the command line -before it is added to file signatures, +before it is added to the action signature, and the <emphasis role="bold">$(</emphasis> and @@ -6745,9 +6745,10 @@ echo Last build occurred $TODAY. > $TARGET echo Last build occurred . > $TARGET </screen> -<para>A variable name may also be the name -of a &consvar; which refers to a &Python; function -called to perform the variable substitution. +<para>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: <parameter>target</parameter>, <parameter>source</parameter>, @@ -6768,7 +6769,7 @@ above) if <parameter>for_signature</parameter> is true. </para> <para> -SCons will insert whatever +&SCons; will insert whatever the called function returns into the expanded string: </para> @@ -6781,7 +6782,7 @@ def foo(target, source, env, for_signature): env = Environment(FOO=foo, BAR="$FOO baz") </programlisting> -<para>As a reminder, substitution evaluation happens when +<para>As a reminder, substitution happens when <literal>$BAR</literal> is actually used in a builder action. The value of <literal>env['BAR']</literal> will be exactly as it was set: <literal>"$FOO baz"</literal>. |