From 604caeb0af761aba39ca4466734589b7293cce74 Mon Sep 17 00:00:00 2001 From: Vijay Kumar Banerjee Date: Wed, 7 Apr 2021 19:45:04 -0600 Subject: bsp_drivers: Use os.path for compatibility with non Unix host --- bsp_drivers.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/bsp_drivers.py b/bsp_drivers.py index 3ca10c6..ec25c23 100644 --- a/bsp_drivers.py +++ b/bsp_drivers.py @@ -36,18 +36,18 @@ def bsp_files(bld): include_dirs = {} include_files = [] - special_case_dirs = {'atsamv': './bsps/arm/atsam', - 'lm32_evr': './bsps/lm32', - 'lpc24xx_ea': './bsps/arm/shared/'} + special_case_dirs = {'atsamv': os.path.expanduser('bsps/arm/atsam'), + 'lm32_evr': os.path.expanduser('bsps/lm32'), + 'lpc24xx_ea': os.path.expanduser('bsps/arm/shared/')} special_case_sources = {'leon2': - ['./bsps/shared/grlib/net/network_interface_add.c', - './bsps/shared/grlib/net/greth.c'], + [os.path.expanduser('bsps/shared/grlib/net/network_interface_add.c'), + os.path.expanduser('bsps/shared/grlib/net/greth.c')], 'leon3': - ['./bsps/shared/grlib/net/network_interface_add.c', - './bsps/shared/grlib/net/greth.c'], + [os.path.expanduser('bsps/shared/grlib/net/network_interface_add.c'), + os.path.expanduser('bsps/shared/grlib/net/greth.c')], 'griscv': - ['./bsps/shared/grlib/net/network_interface_add.c', - './bsps/shared/grlib/net/greth.c']} + [os.path.expanduser('bsps/shared/grlib/net/network_interface_add.c'), + os.path.expanduser('bsps/shared/grlib/net/greth.c')]} bsp_list = bld.env.RTEMS_ARCH_BSP_LIST @@ -57,7 +57,7 @@ def bsp_files(bld): include_dirs[bsp] = [] source_files[bsp] = [] if bsp not in special_case_dirs: - source_dir = os.walk(os.path.join('./bsps', arch, bsp)) + source_dir = os.walk(os.path.join('bsps', arch, bsp)) else: source_dir = os.walk(special_case_dirs[bsp]) for root, dirs, files in source_dir: @@ -70,5 +70,5 @@ def bsp_files(bld): include_dirs[bsp].append(root) if bsp in special_case_sources: source_files[bsp].extend(special_case_sources[bsp]) - include_dirs[bsp].append(os.path.join('./bsps', arch, bsp, 'net')) + include_dirs[bsp].append(os.path.join('bsps', arch, bsp, 'net')) return (include_dirs, source_files) -- cgit v1.2.3