]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixes argument handling in build.bat and HHC search
authorSteve Dower <steve.dower@microsoft.com>
Tue, 21 Jul 2015 04:34:45 +0000 (21:34 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Tue, 21 Jul 2015 04:34:45 +0000 (21:34 -0700)
Doc/make.bat
PCbuild/build.bat

index 3ff91f288dc1fda02ba77f2322e12fdb46ffd59b..5ab80850a3103b0d7ae49125b96bde3e39e0e774 100644 (file)
@@ -17,7 +17,13 @@ where hhc /q && set HTMLHELP=hhc && goto :skiphhcsearch
 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
@@ -85,15 +91,6 @@ if NOT "%PAPER%" == "" (
 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
index 17f8686b428bba3e4801266a68475eafe8ab8f01..0fb01d777d7ea1ab47edf0b82b893234e70d5d14 100644 (file)
@@ -25,24 +25,24 @@ set verbose=/nologo /v:m
 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