[PATCH 04/12] build: Improve value substitution

Chris Johns chrisj at rtems.org
Fri Jul 1 00:18:10 UTC 2022


On 29/6/2022 4:30 pm, Sebastian Huber wrote:
> The waf build system uses lists for tool flags.  The build items may use
> variable substitution.  Add the ability to use the variable substitution in
> lists.  For example:
> 
> MORE_FLAGS = ['-more', '-flags']
> 
> flags:
> - -some-flag
> - ${MORE_FLAGS}
> 
> Before this change, the ${MORE_FLAGS} was substituted to "-more -flags".  This
> would be passed by waf as a single command line argument to the tool.
> 
> After this change, the ${MORE_FLAGS} list extends the flags list:
> 
> flags = ['-some-flag', '-more', '-flags']
> 
> This list extension is performed if a list element consists of exactly one
> variable.

Is nesting supported?

Chris


More information about the devel mailing list