[PATCH 04/12] build: Improve value substitution

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jul 1 04:57:56 UTC 2022



On 01.07.22 02:18, Chris Johns wrote:
> 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?

You mean lists of lists? Yes, this would work, but we don't have lists 
of lists in the build system.

The variable substitution in general is not recursive currently.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list