[Scons-users] Correct way to expand path variables
Henry Gomersall
heng at cantab.net
Fri Oct 18 10:06:10 EDT 2013
On 14/10/13 18:03, Dirk Bächle wrote:
> On 14.10.2013 18:10, Henry Gomersall wrote:
>> On 14/10/13 15:35, Gary Oberbrunner wrote:
>>> Hi Henry; use env.subst(str, target, source). You may also need to
>>> call env.str2nodes.
>>
>> That doesn't seem to do as expected, though I'm not quite sure
>> whether I'm missing something:
>>
>> In src/SConscript:
>> env.AppendUnique(JINJA_TEMPLATE_SEARCHPATH=['#foo', 'bar'])
>>
>> in the scanner function:
>> print env.subst(env['JINJA_TEMPLATE_SEARCHPATH'])
>>
>
> please try
>
> print env.subst('$JINJA_TEMPLATE_SEARCHPATH')
>
> instead. Additionally, you might want to have a short look at "7.2.3.
> Expanding Values From a Construction Environment: the subst Method" in
> the UserGuide...
Apologies for the slowness on this, I've been rather busy on other things.
It makes more sense now. I assumed that it was automatically in the same
way that CPPPATH is. Is there a way to do more automated handling so not
requiring the user to instantiate the nodes explicitly?
Cheers,
Henry
More information about the Scons-users
mailing list