[Scons-users] Use raw substitution with Actions

Stefan Ross stefan at electricimp.com
Fri Dec 4 04:02:13 EST 2015


Hi Dirk,

Thanks for following up.

I actually found a workaround which meant I didn't need to solve this
problem.  If I have another similar issue in future I'll write up the
details.

Thanks

Stefan



On Thu, Dec 3, 2015 at 8:06 PM, Dirk Bächle <tshortik at gmx.de> wrote:

> Hi Stefan,
>
> On 25.11.2015 13:29, Stefan Ross wrote:
>
>> Hi,
>>
>> I want to build an Action using raw variable substitution, i.e. my action
>> looks a bit like this:
>>
>> e['something'] = 'a        b      c'
>> e.Command('target', 'source', Action('echo $something > $TARGET'))
>>
>> This doesn't work because the internal whitespace in $something is
>> removed (and I need it).  I see the documentation for subst
>> allows for a raw mode (which works), but since I'm not using subst
>> directly, is there any way to construct the Action I want here?
>>
>>
> in the current source code, I don't see a way to do what you want. You can
> only trigger the RAW mode by calling env.subst() with the mode as argument.
> But the "subst" call itself will never switch to it, based on special
> bracketing or similar.
>
> However, your description sounds very much like it's a sort of XY problem.
> So, if you're still interested in a solution, maybe you can tell us a
> little more about the background of your question and what it is that
> you're actually trying to accomplish.
>
> Best regards,
>
> Dirk
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20151204/945bc78e/attachment.html>


More information about the Scons-users mailing list