[Scons-users] How can I manipulate $SOURCE and $TARGET

Tom Tanner (BLOOMBERG/ LONDON) ttanner2 at bloomberg.net
Mon Feb 17 04:42:55 EST 2014


Glad it works. As I stated in my original emal, this is all in the 'Variable Substitution' section of the man pages - probably easiest to find it on the web, as the html contains an index and a link which saves a log of paging through.

It explains how to set up code to be called *whenever* scons interprets a string in a given environment (so $FOO in the example I gave you will work everywhere, not just in xxxxCOMSTR but in action strings, ...), how to pass arguments and how to use attributes. the next section shows how to put chunks of python code into strings, though honestly I'd be feeling very brave before I tried anything more complex than using a simple variable in there



----- Original Message -----
From: scons-users at scons.org
To: scons-users at scons.org
At: Feb 14 2014 19:15:42

Tom, thanks for your answer, it works like a charm.

Now that you have given me the fish, can you teach me to fish myself? I've
looked in vain for documentation or any thread that I could have followed
that would allow me to discover this on my own. Admittedly, I overlook the
obvious at times. I sort of guessed that I could use a method to do this,
but had no idea what its call signature would be.

As an side. Is SCONs identifying construction variables as being strings
that begin with '$' and those subject to a translation method? Are there
other places, besides in the $xxxCOMSTR variables where I can effect the
translation? If so, it would seem the call signature would depend on the
context, i.e. the call signature of

foo (target, source, env, for_signature)

would seem specific to the $xxxCOMSTR class of construction variables. What
about other classes?

JJRussell



--
View this message in context: http://scons.1086193.n5.nabble.com/How-can-I-manipulate-SOURCE-and-TARGET-tp33828p33853.html
Sent from the Users mailing list archive at Nabble.com.
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users



More information about the Scons-users mailing list