summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/user/builders-commands.in23
-rw-r--r--doc/user/builders-commands.xml21
2 files changed, 44 insertions, 0 deletions
diff --git a/doc/user/builders-commands.in b/doc/user/builders-commands.in
index 7265a23..d824052 100644
--- a/doc/user/builders-commands.in
+++ b/doc/user/builders-commands.in
@@ -131,3 +131,26 @@
<scons_output example="ex2">
<scons_output_command>scons -Q</scons_output_command>
</scons_output>
+
+ <para>
+
+ Note that &cv-link-SOURCE; and &cv-link-TARGET; are expanded
+ in the source and target as well as of SCons 1.1,
+ so you can write:
+
+ </para>
+
+ <scons_example name="ex3">
+ <file name="SConstruct" printme="1">
+ env.Command('${SOURCE.basename}.out', 'foo.in', build)
+ </file>
+ </scons_example>
+
+
+ <para>
+
+ which does the same thing as the previous example, but allows you
+ to avoid repeating yourself.
+
+ </para>
+
diff --git a/doc/user/builders-commands.xml b/doc/user/builders-commands.xml
index 15a6015..fcb2a96 100644
--- a/doc/user/builders-commands.xml
+++ b/doc/user/builders-commands.xml
@@ -123,3 +123,24 @@
% <userinput>scons -Q</userinput>
build(["foo.out"], ["foo.in"])
</screen>
+
+ <para>
+
+ Note that &cv-link-SOURCE; and &cv-link-TARGET; are expanded
+ in the source and target as well as of SCons 1.1,
+ so you can write:
+
+ </para>
+
+ <programlisting>
+ env.Command('${SOURCE.basename}.out', 'foo.in', build)
+ </programlisting>
+
+
+ <para>
+
+ which does the same thing as the previous example, but allows you
+ to avoid repeating yourself.
+
+ </para>
+