File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 80
80
'ARMC6' : 'ARMC6' ,
81
81
}
82
82
83
+ MBED_LIB_FILENAME = 'mbed_lib.json'
84
+ MBED_APP_FILENAME = 'mbed_app.json'
85
+ CONFIG_FILES = set ([
86
+ MBED_LIB_FILENAME ,
87
+ MBED_APP_FILENAME
88
+ ])
89
+
83
90
84
91
FileRef = namedtuple ("FileRef" , "name path" )
85
92
93
+
86
94
class FileType (object ):
87
95
C_SRC = "c"
88
96
CPP_SRC = "c++"
@@ -280,13 +288,17 @@ def get_file_refs(self, file_type):
280
288
if self ._include_file (ref )
281
289
]
282
290
283
- def filter_by_libraries (self , library_refs ):
291
+ def filter_by_libraries (self , libraries_included ):
284
292
"""
285
293
Call after completely done scanning to filter resources based on
286
294
libraries
287
295
"""
288
- self ._libs_filtered = library_refs
289
- self ._excluded_libs = set (self ._file_refs [FileType .JSON ]) - set (library_refs )
296
+ self ._libs_filtered = set (libraries_included )
297
+ all_library_refs = set (
298
+ ref for ref in self ._file_refs [FileType .JSON ]
299
+ if ref .name .endswith (MBED_LIB_FILENAME )
300
+ )
301
+ self ._excluded_libs = all_library_refs - self ._libs_filtered
290
302
291
303
def _get_from_refs (self , file_type , key ):
292
304
return sorted ([key (f ) for f in self .get_file_refs (file_type )])
You can’t perform that action at this time.
0 commit comments