[PATCH] eng: Add build system chapter
Chris Johns
chrisj at rtems.org
Mon Nov 11 22:29:05 UTC 2019
On 11/11/19 8:45 pm, Sebastian Huber wrote:
> On 08/11/2019 23:48, Chris Johns wrote:[...]
>> 3. Is the ${} expansion something you have implemented? It is a nice feature.
> [...]
>
> With standard Python the substitution itself is a one liner:
>
> def substitute(self, ctx, value):
> if isinstance(value, str):
> try:
> return Template(value).substitute(ctx.env)
> except Exception as e:
> ctx.fatal(
> "In item '{}' substitution in '{}' failed: {}".format(
> self.uid, value, e
> )
> )
> return value
>
Does this support nested defines?
The RSB and rtemstoolkit macros recursively expand as it was a something I found
needed and useful ...
https://git.rtems.org/rtems-tools/tree/rtemstoolkit/macros.py#n471
Chris
More information about the devel
mailing list