Browse Source

update scons script: strict SrcRemove() match rule.

aozima 7 years ago
parent
commit
0d1f75453b
1 changed files with 12 additions and 3 deletions
  1. 12 3
      tools/building.py

+ 12 - 3
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