File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 11# Makefile for Sphinx documentation
2- WATCH_FILES = find .. -type f -not -path '*/\.*' | grep -i '.*[.]rst\|CHANGES\|TODO\|.*conf\.py\|.*[.]py$$' 2> /dev/null
2+ WATCH_FILES = find .. -type f -not -path '*/\.*' | grep -i '.*[.]rst\$\|.*[.].md\|.*[.]py\$\|CHANGES\|TODO\|.*conf\.py' 2> /dev/null
3+ SHELL := /bin/bash
34PYVERSION =$(shell python -c "import sys;v=sys.version_info[0];sys.stdout.write(str(v) )")
45HTTP_PORT = 8023
56
@@ -164,13 +165,16 @@ watch:
164165serve :
165166 @echo ' =============================================================='
166167 @echo
167- @echo ' docs server running at http://0.0.0.0 :${HTTP_PORT}/_build/html '
168+ @echo ' docs server running at http://localhost :${HTTP_PORT}/'
168169 @echo
169170 @echo ' =============================================================='
170171 @if test ${PYVERSION} -eq 2; then $(MAKE ) serve_py2; else make serve_py3; fi
171172
172173serve_py2 :
173- python -m SimpleHTTPServer ${HTTP_PORT}
174+ pushd _build/html ; python2 -m SimpleHTTPServer ${HTTP_PORT} ; popd
174175
175176serve_py3 :
176- python -m http.server ${HTTP_PORT}
177+ python -m http.server ${HTTP_PORT} --directory _build/html
178+
179+ dev :
180+ $(MAKE ) -j watch serve
You can’t perform that action at this time.
0 commit comments