cxxsrc = " \\\n\t".join(cxxsrc) + " \\"
asrc = set(asrc)
asrc = " \\\n\t".join(asrc) + " \\"
- constants = "\n".join([os.path.basename(project_info.info("PROJECT_PATH")) + "_" + key + " = " + unicode(value) for key, value in constants.items()])
+ constants = "\n".join([project_info.info("PROJECT_NAME") + "_" + key + " = " + unicode(value) for key, value in constants.items()])
return csrc, pcsrc, cppasrc, cxxsrc, asrc, constants
def findModuleFiles(module, project_info):
def getSystemPath():
path = os.environ["PATH"]
- if os.name == "nt":
- path = path.split(";")
- else:
- path = path.split(":")
+ path = path.split(os.pathsep)
return path
+def findInPath(file, path=None):
+ if path is None:
+ path = os.environ.get('PATH', '')
+ if type(path) is type(''):
+ path = path.split(os.pathsep)
+ return filter(os.path.exists, map(lambda dir, file=file: os.path.join(dir, file), path))
+
+
def findToolchains(path_list):
toolchains = []
for element in path_list: