Skip to content

Commit abfbd9a

Browse files
committed
fixbug:eclipse.py do not remove all unused path from list
1 parent a6d7dc7 commit abfbd9a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Diff for: tools/eclipse.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
from building import *
2424

25-
MODULE_VER_NUM = 3
25+
MODULE_VER_NUM = 4
2626

2727
source_pattern = ['*.c', '*.cpp', '*.cxx', '*.s', '*.S', '*.asm']
2828

@@ -348,12 +348,13 @@ def GenExcluding(env, project):
348348
rtt_root = os.path.abspath(env['RTT_ROOT'])
349349
bsp_root = os.path.abspath(env['BSP_ROOT'])
350350
coll_dirs = CollectPaths(project['DIRS'])
351-
all_paths = [OSPath(path) for path in coll_dirs]
351+
all_paths_temp = [OSPath(path) for path in coll_dirs]
352+
all_paths = []
352353

353-
# remove unused path
354-
for path in all_paths:
355-
if not path.startswith(rtt_root) and not path.startswith(bsp_root):
356-
all_paths.remove(path)
354+
# add used path
355+
for path in all_paths_temp:
356+
if path.startswith(rtt_root) or path.startswith(bsp_root):
357+
all_paths.append(path)
357358

358359
if bsp_root.startswith(rtt_root):
359360
# bsp folder is in the RT-Thread root folder, such as the RT-Thread source code on GitHub

0 commit comments

Comments
 (0)