update SrcRemove function in building script.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1830 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong@gmail.com 2011-12-10 13:14:26 +00:00
parent 57e2947cfc
commit 6bd0252e26
1 changed files with 10 additions and 9 deletions

View File

@ -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
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)