From fe75990e4ced0cba20871c02d6325584c3bf9b79 Mon Sep 17 00:00:00 2001 From: Mihail Stoyanov Date: Thu, 7 Apr 2016 17:49:05 +0100 Subject: [PATCH] Update GCC toolchain to support the new format for the first line of .d files --- tools/toolchains/gcc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/toolchains/gcc.py b/tools/toolchains/gcc.py index 88a9e0ac38..82f4584685 100644 --- a/tools/toolchains/gcc.py +++ b/tools/toolchains/gcc.py @@ -101,7 +101,9 @@ class GCC(mbedToolchain): def parse_dependencies(self, dep_path): dependencies = [] - for line in open(dep_path).readlines()[1:]: + buff = open(dep_path).readlines() + buff[0] = re.sub('^(.*?)\: ', '', buff[0]) + for line in buff: file = line.replace('\\\n', '').strip() if file: # GCC might list more than one dependency on a single line, in this case