summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorbernard <[email protected]>2014-03-25 10:04:48 +0800
committerbernard <[email protected]>2014-03-25 10:04:48 +0800
commitde16b800a4e94e39c9e97e95eac15d3eb223a36d (patch)
tree22ee83a35ac84892ad21dafbc127c1a037e06974 /tools
parent74ee48a3da005920b89657015cd6dda7dd9c1bc0 (diff)
[scons] fix the BSP_ROOT issue in ua.py.
Diffstat (limited to 'tools')
-rw-r--r--tools/ua.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/ua.py b/tools/ua.py
index 89d3190e23..ac3ea9061c 100644
--- a/tools/ua.py
+++ b/tools/ua.py
@@ -36,6 +36,10 @@ def PrepareUA(project, RTT_ROOT, BSP_ROOT):
CPPDEFINES += group['CPPDEFINES']
if len(CPPPATH):
+ # use absolute path
+ for i in range(len(CPPPATH)):
+ CPPPATH[i] = os.path.abspath(CPPPATH[i])
+
# remove repeat path
paths = [i for i in set(CPPPATH)]
CPPPATH = []
@@ -44,7 +48,7 @@ def PrepareUA(project, RTT_ROOT, BSP_ROOT):
CPPPATH += ['RTT_ROOT + "/%s",' % _make_path_relative(RTT_ROOT, path).replace('\\', '/')]
elif PrefixPath(BSP_ROOT, path):
- CPPPATH += ['BSP_ROOT + "/%s",' % _make_path_relative(RTT_ROOT, path).replace('\\', '/')]
+ CPPPATH += ['BSP_ROOT + "/%s",' % _make_path_relative(BSP_ROOT, path).replace('\\', '/')]
else:
CPPPATH += ['"%s",' % path.replace('\\', '/')]