From bc48d73db3df7d3ae7e526f25f967f19a2e5dae3 Mon Sep 17 00:00:00 2001 From: 0xc0170 Date: Wed, 2 Mar 2016 10:29:30 +0100 Subject: [PATCH] Exporter - progen include dirs fix mbed scripts copy files, therefore file paths are not valid at the moment of ahe project generation. Therefore checks like os.path.isdir or isfile fail. If include is set to TARGET/FOLDER, this would be treated as a file, and added to the project workspace. This commit fixes it, it adds dirs only to include_paths, as it should. --- workspace_tools/export/exporters.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workspace_tools/export/exporters.py b/workspace_tools/export/exporters.py index 3697fae0d6..da49230ff8 100644 --- a/workspace_tools/export/exporters.py +++ b/workspace_tools/export/exporters.py @@ -62,7 +62,7 @@ class Exporter(object): self.resources.objects + self.resources.libraries, }, 'includes': { - 'Include Files': self.resources.headers + self.resources.inc_dirs, + 'Include Files': self.resources.headers, }, 'target': [TARGET_MAP[self.target].progen['target']], 'macros': self.get_symbols(), @@ -76,6 +76,9 @@ class Exporter(object): """" Generate project using ProGen Project API """ settings = ProjectSettings() project = Project(self.program_name, [project_data], settings) + # TODO: Fix this, the inc_dirs are not valid (our scripts copy files), therefore progen + # thinks it is not dict but a file, and adds them to workspace. + project.project['common']['include_paths'] = self.resources.inc_dirs project.generate(tool_name, copied=True) def __scan_all(self, path):