From 5ce39b8ad833d129616ac888fc27208e62e39cc1 Mon Sep 17 00:00:00 2001 From: bernard Date: Sun, 23 Feb 2014 00:08:38 +0800 Subject: [scons] Add the library to the group when used buildlib building --- tools/building.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/building.py b/tools/building.py index 00ef97c4b0..372d93f06f 100644 --- a/tools/building.py +++ b/tools/building.py @@ -327,9 +327,11 @@ def DefineGroup(name, src, depend, **parameters): # check whether exist group library if not GetOption('buildlib') and os.path.exists(os.path.join(group['path'], GroupLibFullName(name, Env))): - Env.Append(LIBS = [GroupLibName(name, Env)]) group['src'] = [] - Env.Append(LIBPATH = [GetCurrentDir()]) + if group.has_key('LIBS'): group['LIBS'] = group['LIBS'] + [GroupLibName(name, Env)] + else : group['LIBS'] = [GroupLibName(name, Env)] + if group.has_key('LIBPATH'): group['LIBPATH'] = group['LIBPATH'] + [GetCurrentDir()] + else : group['LIBPATH'] = [GetCurrentDir()] if group.has_key('LIBS'): Env.Append(LIBS = group['LIBS']) -- cgit v1.3.1 From 3d80e414ff6c03ff04fecb914e7aa9b3fb535e03 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Tue, 25 Feb 2014 13:43:59 +0800 Subject: [JS] fix the include path issue --- components/dfs/filesystems/romfs/mkromfs.py | 13 +++++++------ components/external/espruino/SConscript | 2 +- tools/building.py | 5 ----- 3 files changed, 8 insertions(+), 12 deletions(-) (limited to 'tools') diff --git a/components/dfs/filesystems/romfs/mkromfs.py b/components/dfs/filesystems/romfs/mkromfs.py index a84458e892..d1354eb259 100644 --- a/components/dfs/filesystems/romfs/mkromfs.py +++ b/components/dfs/filesystems/romfs/mkromfs.py @@ -4,6 +4,7 @@ import string basename = '' output = '' +sep = os.sep def mkromfs_output(out): # print '%s' % out, @@ -54,12 +55,12 @@ def mkromfs_dir(dirname, is_root = False): fullpath = os.path.join(path, item) if os.path.isfile(fullpath): subpath = fullpath[len(basename):] - array = subpath.split('\\') + array = subpath.split(sep) arrayname = string.join(array, '_') mkromfs_file(fullpath, arrayname) subpath = path[len(basename):] - dir = subpath.split('\\') + dir = subpath.split(sep) direntname = string.join(dir, '_') if is_root: mkromfs_output('const struct romfs_dirent _root_dirent[] = {\n') @@ -69,12 +70,12 @@ def mkromfs_dir(dirname, is_root = False): for item in list: fullpath = os.path.join(path, item) fn = fullpath[len(dirname):] - if fn[0] == '\\': + if fn[0] == sep: fn = fn[1:] fn = fn.replace('\\', '/') subpath = fullpath[len(basename):] - items = subpath.split('\\') + items = subpath.split(sep) item_name = string.join(items, '_') item_name = item_name.replace('.', '_') item_name = item_name.replace('-', '_') @@ -92,12 +93,12 @@ def mkromfs_dir(dirname, is_root = False): for item in list: fullpath = os.path.join(path, item) fn = fullpath[len(dirname):] - if fn[0] == '\\': + if fn[0] == sep: fn = fn[1:] fn = fn.replace('\\', '/') subpath = fullpath[len(basename):] - items = subpath.split('\\') + items = subpath.split(sep) item_name = string.join(items, '_') item_name = item_name.replace('.', '_') item_name = item_name.replace('-', '_') diff --git a/components/external/espruino/SConscript b/components/external/espruino/SConscript index 03088359ff..7e94473d94 100644 --- a/components/external/espruino/SConscript +++ b/components/external/espruino/SConscript @@ -1,7 +1,7 @@ from building import * cwd = GetCurrentDir() -path = [cwd + '/src', cwd + '/gen', cwd + '/libs', cwd + '/targets/rtthread'] +path = [cwd, cwd + '/src', cwd + '/gen', cwd + '/libs', cwd + '/targets/rtthread'] src = Split(""" src/jsdevices.c diff --git a/tools/building.py b/tools/building.py index 372d93f06f..6427e7c0dd 100644 --- a/tools/building.py +++ b/tools/building.py @@ -284,11 +284,6 @@ def MergeGroup(src_group, group): else: src_group['LIBPATH'] = group['LIBPATH'] - if src_group.has_key('LIBS'): - print src_group['LIBS'] - if src_group.has_key('LIBS'): - print src_group['LIBPATH'] - def DefineGroup(name, src, depend, **parameters): global Env if not GetDepend(depend): -- cgit v1.3.1