Morpheus / mbed-tools

Fork of mbed-tools by -deleted-

Revision:
21:b44960d78246
Parent:
2:5f044fef8f98
--- a/toolchains/gcc.py	Wed Apr 06 21:11:32 2016 +0100
+++ b/toolchains/gcc.py	Thu Apr 07 17:37:10 2016 +0100
@@ -101,7 +101,9 @@
 
     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