From 9aa3b58bae6928e3c58ecba5295f0302ca71ba9e Mon Sep 17 00:00:00 2001 From: armink Date: Tue, 10 Dec 2019 16:40:17 +0800 Subject: [PATCH] [tools] remove unused path when using scons target eclipse. --- tools/eclipse.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/eclipse.py b/tools/eclipse.py index daac72befe..253db37bea 100644 --- a/tools/eclipse.py +++ b/tools/eclipse.py @@ -336,6 +336,11 @@ def GenExcluding(env, project): coll_dirs = CollectPaths(project['DIRS']) all_paths = [OSPath(path) for path in coll_dirs] + # remove unused path + for path in all_paths: + if not path.startswith(rtt_root) and not path.startswith(bsp_root): + all_paths.remove(path) + if bsp_root.startswith(rtt_root): # bsp folder is in the RT-Thread root folder, such as the RT-Thread source code on GitHub exclude_paths = ExcludePaths(rtt_root, all_paths)