Skip to content

Commit 1aa6176

Browse files
ramya-subramanyamjaenrig-ifx
authored andcommitted
tools/mtb-lib.cmd: Fix minor issues related to abs path.
Signed-off-by: Ramya Subramanyam <ramya.subramanyam@infineon.com>
1 parent e56f211 commit 1aa6176

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tools/mtb-lib.cmd

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ exit /b 0
9090
set "inc_dirs_file_name=mtb-lib-inc-dirs.txt"
9191
set "inc_dirs_file=%platform_path%\variants\%board_variant%\%inc_dirs_file_name%"
9292

93+
rem Delete the inc dirs file if it exists
94+
if exist "%build_path%\%inc_dirs_file_name%" (
95+
del "%build_path%\%inc_dirs_file_name%"
96+
)
97+
9398
rem Read the inc dirs file
9499
set "inc_dirs="
95100
setlocal enabledelayedexpansion
@@ -107,10 +112,12 @@ exit /b 0
107112
set "dir=%%a"
108113
set "dir_no_prefix=!dir:~2!"
109114

110-
rem Replace the forward slashes with backslashes
111-
set "dir_no_prefix=!dir_no_prefix:/=\!"
112115
rem Prepend the platform path to the relative path
113116
set "dir_abs_path=-I%platform_path%\!dir_no_prefix!"
117+
118+
rem Replace the forward slashes with backslashes
119+
set "dir_abs_path=!dir_abs_path:/=\!"
120+
114121
rem Change backslashes to double backsplashes
115122
set "dir_abs_path=!dir_abs_path:\=\\!"
116123

0 commit comments

Comments
 (0)