From 0d1f75453bb42917841b7e741abe05403f4d4b89 Mon Sep 17 00:00:00 2001 From: aozima Date: Sat, 7 Apr 2018 17:14:12 +0800 Subject: [PATCH 1/2] update scons script: strict SrcRemove() match rule. --- tools/building.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tools/building.py b/tools/building.py index 42cb37dc4..990e57edc 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: + item_str = item + else: + 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: - if os.path.basename(item.rstr()) in remove: - src.remove(item) + for remove_item in remove: + if item_str == str(remove_item): + src.remove(item) def GetVersion(): import SCons.cpp From 1ff8d7339bf468f2385de0c122df5a5bb27dda52 Mon Sep 17 00:00:00 2001 From: aozima Date: Sun, 8 Apr 2018 10:24:06 +0800 Subject: [PATCH 2/2] [bsp] [sam7x]: fix SConscript spelling error. --- bsp/sam7x/drivers/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/sam7x/drivers/SConscript b/bsp/sam7x/drivers/SConscript index 466c472cd..df0abc543 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]