diff options
| author | Man, Jianting (Meco) <[email protected]> | 2022-10-03 10:43:08 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-10-03 10:43:08 -0400 |
| commit | f7be5fc84b934dfe588acd947fb75abc6833fde8 (patch) | |
| tree | 2960baab41b4d93f1ad1ba202f5088149403fcab /bsp/wch | |
| parent | f741ccb40083e61b772b0d140839fa6de34d5e5e (diff) | |
[bsp][applications][sconscript] 整理统一sconscript格式 (#6481)
* [bsp][sconscript] 整理统一sconscript格式
* update
* update
Diffstat (limited to 'bsp/wch')
| -rw-r--r-- | bsp/wch/arm/ch32f103c8-core/applications/SConscript | 18 | ||||
| -rw-r--r-- | bsp/wch/arm/ch32f203r-evt/applications/SConscript | 18 | ||||
| -rw-r--r-- | bsp/wch/arm/ch579m/applications/SConscript | 18 | ||||
| -rw-r--r-- | bsp/wch/risc-v/ch32v103r-evt/applications/SConscript | 18 | ||||
| -rw-r--r-- | bsp/wch/risc-v/ch569w-evt/applications/SConscript | 16 |
5 files changed, 40 insertions, 48 deletions
diff --git a/bsp/wch/arm/ch32f103c8-core/applications/SConscript b/bsp/wch/arm/ch32f103c8-core/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/wch/arm/ch32f103c8-core/applications/SConscript +++ b/bsp/wch/arm/ch32f103c8-core/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/wch/arm/ch32f203r-evt/applications/SConscript b/bsp/wch/arm/ch32f203r-evt/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/wch/arm/ch32f203r-evt/applications/SConscript +++ b/bsp/wch/arm/ch32f203r-evt/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/wch/arm/ch579m/applications/SConscript b/bsp/wch/arm/ch579m/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/wch/arm/ch579m/applications/SConscript +++ b/bsp/wch/arm/ch579m/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/wch/risc-v/ch32v103r-evt/applications/SConscript b/bsp/wch/risc-v/ch32v103r-evt/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/wch/risc-v/ch32v103r-evt/applications/SConscript +++ b/bsp/wch/risc-v/ch32v103r-evt/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/wch/risc-v/ch569w-evt/applications/SConscript b/bsp/wch/risc-v/ch569w-evt/applications/SConscript index f99a1b878d..496584a1ae 100644 --- a/bsp/wch/risc-v/ch569w-evt/applications/SConscript +++ b/bsp/wch/risc-v/ch569w-evt/applications/SConscript @@ -1,15 +1,15 @@ from building import * +import os cwd = GetCurrentDir() +src = ['main.c'] +CPPPATH = [cwd] -app = ARGUMENTS.get('app', "main") +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) -src = Split(""" -{}.c -""".format(app)) - -path = [cwd, str(Dir('#'))] - -group = DefineGroup('Applications', src, depend=[''], CPPPATH=path) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) Return('group') |
