diff options
| author | aozima <[email protected]> | 2018-04-07 17:14:12 +0800 |
|---|---|---|
| committer | aozima <[email protected]> | 2018-04-07 17:50:14 +0800 |
| commit | 0d1f75453bb42917841b7e741abe05403f4d4b89 (patch) | |
| tree | 0077d562b3ac27c07462098bf15472ded551dd43 /tools/building.py | |
| parent | a8a2e55444b8a45b754f482e5c12a9e4aeafcbeb (diff) | |
update scons script: strict SrcRemove() match rule.
Diffstat (limited to 'tools/building.py')
| -rw-r--r-- | tools/building.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tools/building.py b/tools/building.py index 42cb37dc4f..990e57edcd 100644 --- a/tools/building.py +++ b/tools/building.py @@ -743,11 +743,20 @@ def SrcRemove(src, remove): for item in src: if type(item) == type('str'): - if os.path.basename(item) in remove: - src.remove(item) + item_str = item else: - if os.path.basename(item.rstr()) in remove: + item_str = item.rstr() + + if os.path.isabs(item_str): + item_str = os.path.relpath(item_str, GetCurrentDir()) + + if type(remove) == type('str'): + if item_str == remove: src.remove(item) + else: + for remove_item in remove: + if item_str == str(remove_item): + src.remove(item) def GetVersion(): import SCons.cpp |
