提交 6bd0252e 编写于 作者: B bernard.xiong@gmail.com

update SrcRemove function in building script.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1830 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 57e2947c
......@@ -609,13 +609,14 @@ def EndBuilding(target):
if GetOption('target') == 'iar':
IARProject('project.ewp', Projects)
import copy
def SrcRemove(src, remove):
src_tmp = copy.copy(src)
count = 0
for i in range(0, len(src_tmp)):
s = os.path.basename(str(src_tmp[i]))
if s in remove:
src.pop(i-count)
count = count + 1
return src
\ No newline at end of file
if type(src[0]) == type('str'):
for item in src:
if os.path.basename(item) in remove:
src.remove(item)
return
for item in src:
if os.path.basename(item.rstr()) in remove:
src.remove(item)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册