From c24c4f8e16cfd1c1d6f2ecb9b74e37102975ea87 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Sun, 24 Feb 2013 23:29:27 +0800 Subject: [PATCH] building.py: append messed up objs list, use extend to avoid that The return type of SConscript is a subclass of UserList. We should use extend to keep the depth of the list is always 1 when concatenate SConscript return values. Thanks prife for making me realize that this is really a problem. Reported-and-Tested-by: prife --- tools/building.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/building.py b/tools/building.py index a1e63f8fa..a93dcb6fa 100644 --- a/tools/building.py +++ b/tools/building.py @@ -134,13 +134,13 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ objs = SConscript('SConscript', variant_dir='build', duplicate=0) Repository(Rtt_Root) # include kernel - objs.append(SConscript(Rtt_Root + '/src/SConscript', variant_dir='build/src', duplicate=0)) + objs.extend(SConscript(Rtt_Root + '/src/SConscript', variant_dir='build/src', duplicate=0)) # include libcpu if not has_libcpu: - objs.append(SConscript(Rtt_Root + '/libcpu/SConscript', variant_dir='build/libcpu', duplicate=0)) + objs.extend(SConscript(Rtt_Root + '/libcpu/SConscript', variant_dir='build/libcpu', duplicate=0)) # include components - objs.append(SConscript(Rtt_Root + '/components/SConscript', + objs.extend(SConscript(Rtt_Root + '/components/SConscript', variant_dir='build/components', duplicate=0, exports='remove_components')) -- GitLab