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

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