add source remove method

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1816 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
goprife@gmail.com 2011-11-29 03:49:14 +00:00
parent b38a97572c
commit 819fd97ff8
1 changed files with 621 additions and 611 deletions

View File

@ -609,3 +609,13 @@ 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):
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