[Scons-dev] Subst API...
Gary Oberbrunner
garyo at oberbrunner.com
Mon Oct 1 19:51:01 EDT 2012
On Mon, Oct 1, 2012 at 6:32 PM, Kenny, Jason L <jason.l.kenny at intel.com> wrote:
> I don't see this as not being possible in SCons.. it currently is just harder than it should be.
This is true -- you can modify $LINKCOM to add something like
$EXTRA_STATIC_LIBS and surround those with -Bstatic/-Bdynamic, but
that means you have to do the ${concat...} thing and introduce a
couple of "hidden" vars, which I think is too hard for most SCons
users. So we just tell them to pass the Node.
I totally agree with your larger point, which is that the substitution
logic (and quoting logic; they kind of go together) need an overhaul.
I don't know about ${xyz(${ABC}}, but indeed strings and lists and
dicts and other substitutable entities aren't handled all that well
yet. Some things still assume space-separation that shouldn't, though
at this point most of those that handle filenames should be OK. But
yes, it'd be great to do better.
If you can find it in the old archives, there was a discussion about
this, with the subject line: "String expansion, quoting, escaping, and
caching": http://thread.gmane.org/gmane.comp.programming.tools.scons.devel/7272/focus=7285,
with a little followup at
http://thread.gmane.org/gmane.comp.programming.tools.scons.devel/7261/focus=7294,
and a much earlier discussion at
http://thread.gmane.org/gmane.comp.programming.tools.scons.devel/80/focus=89
(in which we discuss the fundamental problem of $VAR expansion needing
to know its context, i.e. into a list, or into a string, and I floated
the idea of $[VAR] meaning to expand as a list).
--
Gary
More information about the Scons-dev
mailing list