Skip to content

Commit f1e29ce

Browse files
Allows to specify the port on which serve documentation (GH-31145)
[user@localhost]$ make serve # default configuration, no change python3 ../Tools/scripts/serve.py build/html Serving build/html on port 8000, control-C to stop ^CShutting down. [user@localhost]$ make serve SERVE_PORT=8080 # new option python3 ../Tools/scripts/serve.py build/html 8080 Serving build/html on port 8080, control-C to stop
1 parent 96b344c commit f1e29ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ PAPER =
1212
SOURCES =
1313
DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py)
1414
SPHINXERRORHANDLING = -W
15+
SERVE_PORT =
1516

1617
# Internal variables.
1718
PAPEROPT_a4 = -D latex_elements.papersize=a4paper
@@ -217,7 +218,7 @@ check:
217218
$(PYTHON) tools/rstlint.py ../Misc/NEWS.d/next/
218219

219220
serve:
220-
$(PYTHON) ../Tools/scripts/serve.py build/html
221+
$(PYTHON) ../Tools/scripts/serve.py build/html $(SERVE_PORT)
221222

222223
# Targets for daily automated doc build
223224
# By default, Sphinx only rebuilds pages where the page content has changed.

0 commit comments

Comments
 (0)