@@ -6,6 +6,8 @@ SPHINXOPTS =
66SPHINXBUILD = sphinx-build
77PAPER =
88BUILDDIR = _build
9+ VENV = env/bin/activate
10+ PORT = 8001
911
1012# Internal variables.
1113PAPEROPT_a4 = -D latex_paper_size=a4
@@ -17,6 +19,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
1719help :
1820 @echo " Please use \` make <target>' where <target> is one of"
1921 @echo " html to make standalone HTML files"
22+ @echo " run to build the docs, watch for changes, and serve them at http://0.0.0.0:8001"
2023 @echo " dirhtml to make HTML files named index.html in directories"
2124 @echo " singlehtml to make a single large HTML file"
2225 @echo " pickle to make pickle files"
3235 @echo " changes to make an overview of all changed/added/deprecated items"
3336 @echo " linkcheck to check all external links for integrity"
3437 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
35-
38+ @echo " spelling to check for typos in documentation"
39+
40+ install :
41+ @echo " ... setting up virtualenv"
42+ python3 -m venv env
43+ . $(VENV ) ; pip install -r requirements.txt
44+
45+ @echo "\n" \
46+ "-------------------------------------------------------------------------------------------------- \n" \
47+ "* watch, build and serve the documentation: make run \n" \
48+ "* check spelling: make spelling \n" \
49+ "\n" \
50+ "enchant must be installed in order for pyenchant (and therefore spelling checks) to work. See \n" \
51+ "http://docs.django-cms.org/en/latest/contributing/documentation.html# install-the-spelling-software \n" \
52+ "-------------------------------------------------------------------------------------------------- \n" \
53+
3654clean :
3755 -rm -rf $(BUILDDIR ) /*
3856
@@ -128,3 +146,12 @@ doctest:
128146 $(SPHINXBUILD ) -b doctest $(ALLSPHINXOPTS ) $(BUILDDIR ) /doctest
129147 @echo " Testing of doctests in the sources finished, look at the " \
130148 " results in $( BUILDDIR) /doctest/output.txt."
149+
150+ spelling :
151+ . $(VENV ) ; $(SPHINXBUILD ) -b spelling $(ALLSPHINXOPTS ) build/spelling
152+ @echo
153+ @echo " Check finished. Wrong words can be found in " \
154+ " build/spelling/output.txt."
155+
156+ run :
157+ . $(VENV ) ; sphinx-autobuild $(ALLSPHINXOPTS ) build/html --host 0.0.0.0 --port $(PORT )
0 commit comments