summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2015-02-08 22:07:35 (GMT)
committerLarry Hastings <larry@hastings.org>2015-02-08 22:07:35 (GMT)
commitdf4fb13cdcbb375c4901158778aef6cc8cf9a255 (patch)
tree1786941c32b1b0efbbd376066f69ced5037d713d /Doc
parentf77232b04e176b3be5c115b9217feb3785557868 (diff)
parent312cef086b277c6f79cde5b345f0ce1ada81095e (diff)
downloadcpython-df4fb13cdcbb375c4901158778aef6cc8cf9a255.zip
cpython-df4fb13cdcbb375c4901158778aef6cc8cf9a255.tar.gz
cpython-df4fb13cdcbb375c4901158778aef6cc8cf9a255.tar.bz2
Merge.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/make.bat18
1 files changed, 11 insertions, 7 deletions
diff --git a/Doc/make.bat b/Doc/make.bat
index fd54cb8..6aae34a 100644
--- a/Doc/make.bat
+++ b/Doc/make.bat
@@ -8,13 +8,17 @@ set this=%~n0
if "%SPHINXBUILD%" EQU "" set SPHINXBUILD=sphinx-build
if "%PYTHON%" EQU "" set PYTHON=py
-if "%HTMLHELP%" EQU "" (
- where hhc 2>nul >"%TEMP%\hhc.loc"
- if errorlevel 1 dir "..\externals\hhc.exe" /s/b > "%TEMP%\hhc.loc"
- if errorlevel 1 echo Cannot find HHC on PATH or in externals & exit /B 1
- set /P HTMLHELP= < "%TEMP%\hhc.loc"
- del "%TEMP%\hhc.loc"
-)
+if "%1" NEQ "htmlhelp" goto :skiphhcsearch
+if exist "%HTMLHELP%" goto :skiphhcsearch
+
+rem Search for HHC in likely places
+set HTMLHELP=
+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"
+if not exist "%HTMLHELP%" where /R "%ProgramFiles(x86)%" hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
+if not exist "%HTMLHELP%" where /R "%ProgramFiles%" hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
+if not exist "%HTMLHELP%" echo Cannot find HHC on PATH or in externals & exit /B 1
+:skiphhcsearch
if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/extensions/patchlevel.py`) do set DISTVERSION=%%v