aboutsummaryrefslogtreecommitdiff
path: root/bootstrap-msvc.bat
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-18 08:45:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-18 08:45:10 +0200
commitffb6ab0941f17a6ae7975cd92104541851d4413a (patch)
tree0b35413b58c79358c06b6a183975e501aa8e3398 /bootstrap-msvc.bat
parent7ef6c2f53b404ef74ab1f592652f34c8fcebad23 (diff)
Minor bootstrap batch file cleanups
Diffstat (limited to 'bootstrap-msvc.bat')
-rw-r--r--bootstrap-msvc.bat17
1 files changed, 8 insertions, 9 deletions
diff --git a/bootstrap-msvc.bat b/bootstrap-msvc.bat
index 56623d4..1238e44 100644
--- a/bootstrap-msvc.bat
+++ b/bootstrap-msvc.bat
@@ -19,7 +19,7 @@ echo.
echo The batch file expects to find the libbutl\ or libbutl-*\ directory
echo either in the current directory (build2 root) or one level up.
echo.
-echo Note that is any cl-option arguments are specified, then they must be
+echo Note that if any cl-option arguments are specified, then they must be
echo preceded by the VC compiler executable (use cl.exe as the default).
echo For example:
echo.
@@ -39,6 +39,8 @@ goto :eof
:start
+set "owd=%CD%"
+
if "_%1_" == "_/?_" goto usage
rem See if there is libbutl or libbutl-* in the current directory and one
@@ -108,19 +110,15 @@ rem VC dumps .obj files in the current directory not caring if the names
rem clash. And boy do they clash.
rem
set "obj="
-set "cwd=%CD%"
for %%d in (%src%) do (
echo.
echo compiling in %%d\
echo.
cd %%d
- echo %cxx% /I%cwd%\%libbutl% /I%cwd% /DBUILD2_HOST_TRIPLET=\"i686-microsoft-win32-msvc\" %ops% /c /TP *.cxx
- %cxx% /I%cwd%\%libbutl% /I%cwd% /DBUILD2_HOST_TRIPLET=\"i686-microsoft-win32-msvc\" %ops% /c /TP *.cxx
- if errorlevel 1 (
- cd %cwd%
- goto error
- )
- cd %cwd%
+ echo %cxx% /I%owd%\%libbutl% /I%owd% /DBUILD2_HOST_TRIPLET=\"i686-microsoft-win32-msvc\" %ops% /c /TP *.cxx
+ %cxx% /I%owd%\%libbutl% /I%owd% /DBUILD2_HOST_TRIPLET=\"i686-microsoft-win32-msvc\" %ops% /c /TP *.cxx
+ if errorlevel 1 goto error
+ cd %owd%
set "obj=!obj! %%d\*.obj"
)
@@ -137,6 +135,7 @@ call :clean_obj %src%
goto end
:error
+cd %owd%
endlocal
exit /b 1