From 26ab6d070c704b6f7e21522dc0a038022c647643 Mon Sep 17 00:00:00 2001 From: garyo Date: Thu, 2 Oct 2008 01:43:53 +0000 Subject: [PATCH] Add Users Guide example of using $SOURCE substitution in a target name in a Command builder. Just doc. git-svn-id: http://scons.tigris.org/svn/scons/trunk@3528 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- 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 7265a233..d8240522 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 15a6015c..fcb2a96d 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. + + + -- 2.26.2