From 2339a80cd71559200f18733234af6d5fb93ccbf7 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Thu, 2 Oct 2008 01:43:53 +0000 Subject: Add Users Guide example of using $SOURCE substitution in a target name in a Command builder. Just doc. --- doc/user/builders-commands.in | 23 +++++++++++++++++++++++ doc/user/builders-commands.xml | 21 +++++++++++++++++++++ 2 files changed, 44 insertions(+) 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 -Q + + + + 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: + + + + + + env.Command('${SOURCE.basename}.out', 'foo.in', build) + + + + + + + which does the same thing as the previous example, but allows you + to avoid repeating yourself. + + + 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 @@ % scons -Q build(["foo.out"], ["foo.in"]) + + + + 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: + + + + + env.Command('${SOURCE.basename}.out', 'foo.in', build) + + + + + + which does the same thing as the previous example, but allows you + to avoid repeating yourself. + + + -- cgit v0.12