提交 82a50f29 编写于 作者: X xieyangrun

[tools/building.py]fixed SrcRemove

上级 8430b832
...@@ -803,14 +803,14 @@ def SrcRemove(src, remove): ...@@ -803,14 +803,14 @@ def SrcRemove(src, remove):
if not src: if not src:
return return
src_bak = src src_bak = src[:]
if type(remove) == type('str'): if type(remove) == type('str'):
if os.path.isabs(remove): if os.path.isabs(remove):
remove = os.path.relpath(remove, GetCurrentDir()) remove = os.path.relpath(remove, GetCurrentDir())
remove = os.path.normpath(remove) remove = os.path.normpath(remove)
for item in src: for item in src_bak:
if type(item) == type('str'): if type(item) == type('str'):
item_str = item item_str = item
else: else:
...@@ -821,7 +821,7 @@ def SrcRemove(src, remove): ...@@ -821,7 +821,7 @@ def SrcRemove(src, remove):
item_str = os.path.normpath(item_str) item_str = os.path.normpath(item_str)
if item_str == remove: if item_str == remove:
src_bak.remove(item) src.remove(item)
else: else:
for remove_item in remove: for remove_item in remove:
remove_str = str(remove_item) remove_str = str(remove_item)
...@@ -829,7 +829,7 @@ def SrcRemove(src, remove): ...@@ -829,7 +829,7 @@ def SrcRemove(src, remove):
remove_str = os.path.relpath(remove_str, GetCurrentDir()) remove_str = os.path.relpath(remove_str, GetCurrentDir())
remove_str = os.path.normpath(remove_str) remove_str = os.path.normpath(remove_str)
for item in src: for item in src_bak:
if type(item) == type('str'): if type(item) == type('str'):
item_str = item item_str = item
else: else:
...@@ -840,8 +840,7 @@ def SrcRemove(src, remove): ...@@ -840,8 +840,7 @@ def SrcRemove(src, remove):
item_str = os.path.normpath(item_str) item_str = os.path.normpath(item_str)
if item_str == remove_str: if item_str == remove_str:
src_bak.remove(item) src.remove(item)
src = src_bak
def GetVersion(): def GetVersion():
import SCons.cpp import SCons.cpp
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册