I hate to repeat myself, but why are you even using the
setlocal and it's evil twin
endlocal statements? The whole point of the other thread was to
not localize the variables so you would have global access.
set VOB_BASE_DIR=
for /f "tokens=* delims=\" %%P in ('cd') do (
set _mypath=%%P
)
set _array=%_mypath:\= %
for %%E in (%_array%) do (
if .%%E==. goto getout
if %%E==test goto getout
call set VOB_BASE_DIR=%%VOB_BASE_DIR%%\%%E
)
echo vob= %VOB_BASE_DIR%
:getout
set VOB_BASE_DIR=%VOB_BASE_DIR:~1%
set TOP_DIR=%VOB_BASE_DIR%\\oscl
echo Set TOP_DIR to %TOP_DIR% ...
When echo DIR and TOP_DIR it prints correct value
after that i tried to echo TOP_DIR from command prompt so it prints: %TOP_DIR%
it does not show value.
<sigh>
Assuming the syntax is correct, the makefile probably couldn't find a variable TOP_DIR
There are only 13 or so batch files commands. You don't need to use all of them in any single batch file.