@REM\r
@REM Set the WORKSPACE to the current working directory\r
@REM\r
+pushd .\r
+cd %~dp0\r
set WORKSPACE=%CD%\r
\r
+@if /I not "%1"=="--nt32" goto check_new_build\r
+shift\r
+goto check_vc\r
+\r
+:check_new_build\r
@if /I "%1"=="NewBuild" goto NewBuild\r
\r
:AntBuild\r
:check_vc\r
if defined VCINSTALLDIR goto check_cygwin\r
if defined VS71COMNTOOLS (\r
- call "%VS71COMNTOOLS%\vsvars32.bat"\r
+ call "%VS71COMNTOOLS%\vsvars32.bat"\r
) else (\r
echo.\r
echo !!! WARNING !!!! Cannot find Visual Studio !!!\r
echo.\r
)\r
+goto check_new_build\r
\r
:check_cygwin\r
if defined CYGWIN_HOME goto check_java\r
\r
:NewBuild\r
@IF NOT EXIST "BaseTools\toolsetup.bat" goto AntBuild\r
-@set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools\r
+if not defined EDK_TOOLS_PATH set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools\r
@call BaseTools\toolsetup.bat\r
@goto end\r
\r
:end\r
+@popd\r
@echo on\r
\r