where /R ..\externals hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"\r
if not exist "%HTMLHELP%" where /R "%ProgramFiles(x86)%" hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"\r
if not exist "%HTMLHELP%" where /R "%ProgramFiles%" hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"\r
-if not exist "%HTMLHELP%" echo Cannot find HHC on PATH or in externals & exit /B 1\r
+if not exist "%HTMLHELP%" (\r
+ echo.\r
+ echo.The HTML Help Workshop was not found. Set the HTMLHELP variable\r
+ echo.to the path to hhc.exe or download and install it from\r
+ echo.http://msdn.microsoft.com/en-us/library/ms669985\r
+ exit /B 1\r
+)\r
:skiphhcsearch\r
\r
if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/extensions/patchlevel.py`) do set DISTVERSION=%%v\r
cmd /C %SPHINXBUILD% %SPHINXOPTS% -b%1 -dbuild\doctrees . %BUILDDIR%\%*\r
\r
if "%1" EQU "htmlhelp" (\r
- if not exist "%HTMLHELP%" (\r
- echo.\r
- echo.The HTML Help Workshop was not found. Set the HTMLHELP variable\r
- echo.to the path to hhc.exe or download and install it from\r
- echo.http://msdn.microsoft.com/en-us/library/ms669985\r
- rem Set errorlevel to 1 and exit\r
- cmd /C exit /b 1\r
- goto end\r
- )\r
cmd /C "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp\r
rem hhc.exe seems to always exit with code 1, reset to 0 for less than 2\r
if not errorlevel 2 cmd /C exit /b 0\r
set kill=\r
\r
:CheckOpts\r
-if '%~1'=='-c' (set conf=%2) & shift & shift & goto CheckOpts\r
-if '%~1'=='-p' (set platf=%2) & shift & shift & goto CheckOpts\r
-if '%~1'=='-r' (set target=Rebuild) & shift & goto CheckOpts\r
-if '%~1'=='-t' (set target=%2) & shift & shift & goto CheckOpts\r
-if '%~1'=='-d' (set conf=Debug) & shift & goto CheckOpts\r
-if '%~1'=='-e' call "%dir%get_externals.bat" & shift & goto CheckOpts\r
-if '%~1'=='-m' (set parallel=/m) & shift & goto CheckOpts\r
-if '%~1'=='-M' (set parallel=) & shift & goto CheckOpts\r
-if '%~1'=='-v' (set verbose=/v:n) & shift & goto CheckOpts\r
-if '%~1'=='-k' (set kill=true) & shift & goto CheckOpts\r
-if '%~1'=='-V' shift & goto Version\r
-\r
-if '%platf%'=='x64' (set vs_platf=x86_amd64)\r
+if "%~1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts\r
+if "%~1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts\r
+if "%~1"=="-r" (set target=Rebuild) & shift & goto CheckOpts\r
+if "%~1"=="-t" (set target=%2) & shift & shift & goto CheckOpts\r
+if "%~1"=="-d" (set conf=Debug) & shift & goto CheckOpts\r
+if "%~1"=="-e" call "%dir%get_externals.bat" & shift & goto CheckOpts\r
+if "%~1"=="-m" (set parallel=/m) & shift & goto CheckOpts\r
+if "%~1"=="-M" (set parallel=) & shift & goto CheckOpts\r
+if "%~1"=="-v" (set verbose=/v:n) & shift & goto CheckOpts\r
+if "%~1"=="-k" (set kill=true) & shift & goto CheckOpts\r
+if "%~1"=="-V" shift & goto Version\r
+\r
+if "%platf%"=="x64" (set vs_platf=x86_amd64)\r
\r
rem Setup the environment\r
call "%dir%env.bat" %vs_platf% >nul\r
\r
-if '%kill%'=='true' (\r
+if "%kill%"=="true" (\r
msbuild /v:m /nologo /target:KillPython "%pcbuild%\pythoncore.vcxproj" /p:Configuration=%conf% /p:Platform=%platf% /p:KillPython=true\r
)\r
\r