12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- # Minimal makefile for Sphinx documentation
- #
-
- # You can set these variables from the command line.
- SPHINXOPTS =
- SPHINXBUILD = sphinx-build
- SOURCEDIR = .
- BUILDDIR = _build
- MODULES = $(sort \
- caching\
- fstools\
- helpers\
- socket_protocol\
- state_machine\
- stringtools\
- stringtools.csp\
- stringtools.stp\
- task\
- tcp_socket\
- )
-
- # Put it first so that "make" without argument is like "make help".
-
- .PHONY: all help Makefile
-
- all: index.rst $(MODULES) html
-
- help:
- @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-
- # Catch-all target: route all unknown targets to Sphinx using the new
- # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
- html: Makefile
- @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-
- clean: Makefile
- rm -f *.rst
- @for module in $(MODULES) ; do \
- if [ -d "$$module/_examples_" ]; then make --no-print-directory -C $$module/_examples_ clean; fi \
- done
- @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-
- index.rst: Makefile
- @echo Generating $@
- @echo "Indices and tables\n==================\n\n* :ref:\`genindex\`\n* :ref:\`modindex\`\n* :ref:\`search\`\n" > $@
- @echo "Modules\n=======\n\n.. toctree::\n :maxdepth: 2\n" >> $@
-
- %: Makefile
- @echo "Preparing $@"
- @echo ".. automodule:: $@\n :members:" > $@.rst
- @if [ "$(findstring .,$@)" != "." ]; then \
- git -C $@ checkout master; \
- git -C $@ pull; \
- make -C $@/_examples_ all; \
- fi
- @echo " $@.rst" >> index.rst; \
-
- update:
- git pull
- git submodule init
- git submodule update
- git submodule foreach git checkout master
- git submodule foreach git pull
-
- copy:
- rsync -av --delete _build/html/ /data/webroot/pylib_docs/
- chown www-data.www-data -R /data/webroot/pylib_docs/
|