Module Documentation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Minimal makefile for Sphinx documentation
  2. #
  3. # You can set these variables from the command line.
  4. SPHINXOPTS =
  5. SPHINXBUILD = venv/bin/sphinx-build
  6. SOURCEDIR = .
  7. BUILDDIR = _build
  8. MODULES = $(sort \
  9. caching\
  10. fstools\
  11. helpers\
  12. socket_protocol\
  13. state_machine\
  14. stringtools\
  15. stringtools.csp\
  16. stringtools.stp\
  17. task\
  18. tcp_socket\
  19. )
  20. # Put it first so that "make" without argument is like "make help".
  21. .PHONY: all help Makefile
  22. all: index.rst $(MODULES) html
  23. help:
  24. @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
  25. # Catch-all target: route all unknown targets to Sphinx using the new
  26. # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
  27. html: Makefile
  28. @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
  29. clean: Makefile
  30. rm -f *.rst
  31. @for module in $(MODULES) ; do \
  32. if [ -d "$$module/_examples_" ]; then make --no-print-directory -C $$module/_examples_ clean; fi \
  33. done
  34. @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
  35. index.rst: Makefile
  36. @echo Generating $@
  37. @echo "Indices and tables\n==================\n\n* :ref:\`genindex\`\n* :ref:\`modindex\`\n* :ref:\`search\`\n" > $@
  38. @echo "Modules\n=======\n\n.. toctree::\n :maxdepth: 2\n" >> $@
  39. %: Makefile
  40. @echo "Preparing $@"
  41. @echo ".. automodule:: $@\n :members:" > $@.rst
  42. @if [ "$(findstring .,$@)" != "." ]; then \
  43. git -C $@ checkout master 2>&1; \
  44. git -C $@ pull 2>&1;\
  45. make -C $@/_examples_ all; \
  46. fi
  47. @echo " $@.rst" >> index.rst; \
  48. update:
  49. git pull
  50. git submodule init
  51. git submodule update
  52. git submodule foreach git checkout master
  53. git submodule foreach git pull
  54. copy:
  55. rsync -av --delete _build/html/ /data/htdocs/pylib_docs/
  56. chown www-data.www-data -R /data/htdocs/pylib_docs/