summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bsp/sam7x/drivers/SConscript2
-rw-r--r--tools/building.py15
2 files changed, 13 insertions, 4 deletions
diff --git a/bsp/sam7x/drivers/SConscript b/bsp/sam7x/drivers/SConscript
index 466c472cd8..df0abc5435 100644
--- a/bsp/sam7x/drivers/SConscript
+++ b/bsp/sam7x/drivers/SConscript
@@ -7,7 +7,7 @@ src = Glob('*.c')
if GetDepend('RT_USING_LWIP') == False:
SrcRemove(src, 'sam7x_emac.c')
if GetDepend('RT_USING_DFS') == False:
- SrcRemove(src, 'ssd.c')
+ SrcRemove(src, 'sd.c')
CPPPATH = [cwd]
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