fix qouted string

This commit is contained in:
Tomasz Duda 2024-08-14 17:01:02 +02:00
parent 208969aca7
commit ff97ba9bb3

View file

@ -180,9 +180,14 @@ CONFIG_NEWLIB_LIBC=y
def extract_include_paths(command): def extract_include_paths(command):
include_paths = [] include_paths = []
include_pattern = re.compile(r"(-I|-isystem)\s*([^\s]+)") include_pattern = re.compile(
r'("-I\s*[^"]+)|(-isystem\s*[^\s]+)|(-I\s*[^\s]+)'
)
for match in include_pattern.findall(command): for match in include_pattern.findall(command):
include_paths.append(match[1]) split_strings = re.split(
r"\s*-\s*(?:I|isystem)", list(filter(lambda x: x, match))[0]
)
include_paths.append(split_strings[1])
return include_paths return include_paths
def extract_defines(command): def extract_defines(command):