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.7KB

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