From ffb6ab0941f17a6ae7975cd92104541851d4413a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 18 Aug 2016 08:45:10 +0200 Subject: Minor bootstrap batch file cleanups --- bootstrap-msvc.bat | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'bootstrap-msvc.bat') 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 -- cgit v1.1