提交 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): ...@@ -609,13 +609,14 @@ def EndBuilding(target):
if GetOption('target') == 'iar': if GetOption('target') == 'iar':
IARProject('project.ewp', Projects) IARProject('project.ewp', Projects)
import copy
def SrcRemove(src, remove): def SrcRemove(src, remove):
src_tmp = copy.copy(src) if type(src[0]) == type('str'):
count = 0 for item in src:
for i in range(0, len(src_tmp)): if os.path.basename(item) in remove:
s = os.path.basename(str(src_tmp[i])) src.remove(item)
if s in remove: return
src.pop(i-count)
count = count + 1 for item in src:
return src if os.path.basename(item.rstr()) in remove:
\ No newline at end of file src.remove(item)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册