+ path = path.replace(projectInfo.info("SOURCES_PATH"), projectInfo.info("PROJECT_PATH"))
+ if not harvard or "harvard" not in information or information["harvard"] == "both":
+ csrc.append(path + "/" + filename)
+ if harvard and "harvard" in information:
+ pcsrc.append(path + "/" + filename)
+ csrc = " \\\n\t".join(csrc) + " \\"
+ pcsrc = " \\\n\t".join(pcsrc) + " \\"
+ constants = "\n".join([os.path.basename(projectInfo.info("PROJECT_PATH")) + "_" + key + " = " + str(value) for key, value in constants.items()])
+ return csrc, pcsrc, constants
+
+def codeliteProjectGenerator(projectInfo):
+ template = open("cltemplates/bertos.project").read()
+ filelist = "\n".join(codelite_project.clFiles(codelite_project.findSources(projectInfo.info("PROJECT_PATH")), projectInfo.info("PROJECT_PATH")))
+ while template.find("$filelist") != -1:
+ template = template.replace("$filelist", filelist)
+ projectName = os.path.basename(projectInfo.info("PROJECT_PATH"))
+ while template.find("$project") != -1:
+ template = template.replace("$project", projectName)
+ return template
+
+def codeliteWorkspaceGenerator(projectInfo):
+ template = open("cltemplates/bertos.workspace").read()
+ projectName = os.path.basename(projectInfo.info("PROJECT_PATH"))
+ while template.find("$project") != -1:
+ template = template.replace("$project", projectName)
+ return template