summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2020-07-11 19:58:50 +0800
committerGitHub <[email protected]>2020-07-11 19:58:50 +0800
commit625caba7268d54765d5d1ed68124ce6e6da6ff30 (patch)
tree528c1ca8bf4633a22971ad9ac40ce5da4d0b6fdf
parenta6d7dc73edcafeda53da3168e3e2669dfa17d207 (diff)
parentabfbd9a79a693c574cae303c404d3fa223b51be8 (diff)
Merge pull request #3744 from margguo/fixbug_in_eclipse_py
fixbug:eclipse.py do not remove all unused path from list
-rw-r--r--tools/eclipse.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/eclipse.py b/tools/eclipse.py
index ef546fb15a..fb2e604bdc 100644
--- a/tools/eclipse.py
+++ b/tools/eclipse.py
@@ -22,7 +22,7 @@ from xml.etree.ElementTree import SubElement
from building import *
-MODULE_VER_NUM = 3
+MODULE_VER_NUM = 4
source_pattern = ['*.c', '*.cpp', '*.cxx', '*.s', '*.S', '*.asm']
@@ -348,12 +348,13 @@ def GenExcluding(env, project):
rtt_root = os.path.abspath(env['RTT_ROOT'])
bsp_root = os.path.abspath(env['BSP_ROOT'])
coll_dirs = CollectPaths(project['DIRS'])
- all_paths = [OSPath(path) for path in coll_dirs]
+ all_paths_temp = [OSPath(path) for path in coll_dirs]
+ all_paths = []
- # remove unused path
- for path in all_paths:
- if not path.startswith(rtt_root) and not path.startswith(bsp_root):
- all_paths.remove(path)
+ # add used path
+ for path in all_paths_temp:
+ if path.startswith(rtt_root) or path.startswith(bsp_root):
+ all_paths.append(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