Skip to content

Commit e19d809

Browse files
committed
build(docs): Update Makefile to latest and greatest
1 parent 5405218 commit e19d809

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

doc/Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Makefile for Sphinx documentation
22
#
3-
WATCH_FILES= find .. -type f -not -path '*/\.*' | grep -i '.*[.]rst\|CHANGES\|TODO\|.*conf\.py\|.*[.]py$$' 2> /dev/null
3+
WATCH_FILES= find .. -type f -not -path '*/\.*' | grep -i '.*[.]rst\$\|.*[.].md\|.*[.]py\$\|CHANGES\|TODO\|.*conf\.py' 2> /dev/null
4+
SHELL := /bin/bash
45
PYVERSION=$(shell python -c "import sys;v=sys.version_info[0];sys.stdout.write(str(v))")
56
HTTP_PORT = 8031
67

@@ -165,13 +166,16 @@ watch:
165166
serve:
166167
@echo '=============================================================='
167168
@echo
168-
@echo 'docs server running at http://0.0.0.0:${HTTP_PORT}/_build/html'
169+
@echo 'docs server running at http://localhost:${HTTP_PORT}/'
169170
@echo
170171
@echo '=============================================================='
171172
@if test ${PYVERSION} -eq 2; then $(MAKE) serve_py2; else make serve_py3; fi
172173

173174
serve_py2:
174-
python -m SimpleHTTPServer ${HTTP_PORT}
175+
pushd _build/html; python2 -m SimpleHTTPServer ${HTTP_PORT}; popd
175176

176177
serve_py3:
177-
python -m http.server ${HTTP_PORT}
178+
python -m http.server ${HTTP_PORT} --directory _build/html
179+
180+
dev:
181+
$(MAKE) -j watch serve

0 commit comments

Comments
 (0)