mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
buildman: Improve [make-flags] section parser to allow quoted strings
The parser responsible for the '[make-flags]' section in the '.buildman' settings file is currently not able to handle quoted strings, as given in the sample bellow: [make-flags] qemu_arm=HOSTCC="cc -isystem /add/include" HOSTLDFLAGS="-L/add/lib" This patch replaces the simple string splitter based on the <space> delimiter with a regex tokenizer that preserves spaces inside double quoted strings. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
This commit is contained in:
parent
5e5c785e34
commit
4251fbc6fb
1 changed files with 2 additions and 1 deletions
|
@ -435,9 +435,10 @@ class Toolchains:
|
|||
self._make_flags['target'] = board.target
|
||||
arg_str = self.ResolveReferences(self._make_flags,
|
||||
self._make_flags.get(board.target, ''))
|
||||
args = arg_str.split(' ')
|
||||
args = re.findall("(?:\".*?\"|\S)+", arg_str)
|
||||
i = 0
|
||||
while i < len(args):
|
||||
args[i] = args[i].replace('"', '')
|
||||
if not args[i]:
|
||||
del args[i]
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue