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:
parent
57e2947cfc
commit
6bd0252e26
|
@ -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:
|
||||||
|
src.remove(item)
|
||||||
|
|
Loading…
Reference in New Issue