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.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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; \