From a333ec8ef0f3f22d550398006f3c5e49683cf0ca Mon Sep 17 00:00:00 2001 From: Brian Daniels Date: Tue, 31 May 2016 12:41:09 -0500 Subject: [PATCH] Fixing issue with binary name. There was an issue where the binary name was incorrectly set when building from any directory that isn't the project root. This fixes that issue by first getting the absolute path, then finding the binary name using that. --- tools/build_api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/build_api.py b/tools/build_api.py index 7eff9258c9..0319c4a673 100644 --- a/tools/build_api.py +++ b/tools/build_api.py @@ -97,7 +97,8 @@ def build_project(src_path, build_path, target, toolchain_name, # multiple compilations and linking with the same objects src_paths = [src_paths[0]] + list(set(src_paths[1:])) first_src_path = src_paths[0] if src_paths[0] != "." and src_paths[0] != "./" else getcwd() - project_name = basename(normpath(first_src_path)) + abs_path = abspath(first_src_path) + project_name = basename(normpath(abs_path)) if name is None: # We will use default project name based on project folder name