projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Store the file list in the project object
[bertos.git]
/
wizard
/
bertos_utils.py
diff --git
a/wizard/bertos_utils.py
b/wizard/bertos_utils.py
index bcb4a4afc6e29a404f5668f97aff0b5a9a4d35e4..ad8277fa2010d98d5d46b5e0be8320e940a52915 100644
(file)
--- a/
wizard/bertos_utils.py
+++ b/
wizard/bertos_utils.py
@@
-133,16
+133,21
@@
def getToolchainInfo(output):
info["thread"] = thread[0].split("Thread model: ")[1]
return info
info["thread"] = thread[0].split("Thread model: ")[1]
return info
-def findDefinitions(ftype, path):
- L = os.walk(path)
+def findDefinitions(ftype, project):
+ L = project.info("FILE_LIST")
+ if L is None:
+ L = [f for f in os.walk(project.info("SOURCES_PATH"))]
+ project.setInfo("FILE_LIST", L)
+ definitions = []
for element in L:
for filename in element[2]:
if fnmatch.fnmatch(filename, ftype):
for element in L:
for filename in element[2]:
if fnmatch.fnmatch(filename, ftype):
- yield (filename, element[0])
+ definitions.append((filename, element[0]))
+ return definitions
-def loadCpuInfos(p
ath
):
+def loadCpuInfos(p
roject
):
cpuInfos = []
cpuInfos = []
- for definition in findDefinitions(const.CPU_DEFINITION, p
ath
):
+ for definition in findDefinitions(const.CPU_DEFINITION, p
roject
):
cpuInfos.append(getInfos(definition))
return cpuInfos
cpuInfos.append(getInfos(definition))
return cpuInfos
@@
-261,12
+266,12
@@
def loadModuleInfos(path):
except SyntaxError:
raise DefineException.ModuleDefineException(path)
except SyntaxError:
raise DefineException.ModuleDefineException(path)
-def loadModuleInfosDict(p
ath
):
+def loadModuleInfosDict(p
roject
):
"""
Return the dict containig all the modules
"""
moduleInfosDict = {}
"""
Return the dict containig all the modules
"""
moduleInfosDict = {}
- for filename, path in findDefinitions("*.h", p
ath
):
+ for filename, path in findDefinitions("*.h", p
roject
):
moduleInfosDict.update(loadModuleInfos(path + "/" + filename))
return moduleInfosDict
moduleInfosDict.update(loadModuleInfos(path + "/" + filename))
return moduleInfosDict
@@
-288,12
+293,12
@@
def loadDefineLists(path):
except SyntaxError:
raise DefineException.EnumDefineException(path)
except SyntaxError:
raise DefineException.EnumDefineException(path)
-def loadDefineListsDict(p
ath
):
+def loadDefineListsDict(p
roject
):
"""
Return the dict containing all the define lists
"""
defineListsDict = {}
"""
Return the dict containing all the define lists
"""
defineListsDict = {}
- for filename, path in findDefinitions("*.h", p
ath
):
+ for filename, path in findDefinitions("*.h", p
roject
):
defineListsDict.update(loadDefineLists(path + "/" + filename))
return defineListsDict
defineListsDict.update(loadDefineLists(path + "/" + filename))
return defineListsDict