-def loadSourceTree(project):
- # Index only the SOURCES_PATH/bertos content
- bertos_sources_dir = os.path.join(project.info("SOURCES_PATH"), 'bertos')
- if os.path.exists(bertos_sources_dir):
- fileList = [f for f in os.walk(bertos_sources_dir)]
- else:
- fileList = []
- project.setInfo("FILE_LIST", fileList)
-
-_cached_queries = {}
-
-def findDefinitions(ftype, project):
- definitions = _cached_queries.get(ftype, None)
- if definitions is not None:
- return definitions
- L = project.info("FILE_LIST")
- definitions = []
- for element in L:
- for filename in element[2]:
- if fnmatch.fnmatch(filename, ftype):
- definitions.append((filename, element[0]))
- _cached_queries[ftype] = definitions
- return definitions
-
-def loadCpuInfos(project):