File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 11# Makefile for Sphinx documentation
22#
3+ PYVERSION =$(shell python -c "import sys;v=sys.version_info[0];sys.stdout.write(str(v) )")
4+ HTTP_PORT = 8023
35
46# You can set these variables from the command line.
57SPHINXOPTS =
@@ -162,9 +164,15 @@ watch:
162164 if command -v entr > /dev/null; then ${WATCH_FILES} | entr -c $( MAKE) html; else $( MAKE) html; fi
163165
164166serve :
165- @echo ' ======================================================== '
167+ @echo ' ================================================='
166168 @echo
167- @echo ' docs server running at http://0.0.0.0:8023 /_build/html '
169+ @echo ' docs server running at http://0.0.0.0:${HTTP_PORT} /_build/html'
168170 @echo
169- @echo ' ========================================================'
170- python -m SimpleHTTPServer 8023
171+ @echo ' ================================================='
172+ @if test ${PYVERSION} -eq 2; then $(MAKE ) serve_py2; else make serve_py3; fi
173+
174+ serve_py2 :
175+ python -m SimpleHTTPServer ${HTTP_PORT}
176+
177+ serve_py3 :
178+ python -m http.server ${HTTP_PORT}
You can’t perform that action at this time.
0 commit comments