Makefile 1.1 KB

1234567891011121314151617181920212223242526272829
  1. # Makefile for Sphinx documentation
  2. #
  3. # You can set these variables from the command line, and also
  4. # from the environment for the first two.
  5. SPHINXOPTS ?=
  6. SPHINXBUILD ?= sphinx-build
  7. SOURCEDIR = .
  8. BUILDDIR = _build
  9. AUTODOCDIR = api
  10. # User-friendly check for sphinx-build
  11. ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $?), 1)
  12. $(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/")
  13. endif
  14. .PHONY: help clean Makefile
  15. # Put it first so that "make" without argument is like "make help".
  16. help:
  17. @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
  18. clean:
  19. rm -rf $(BUILDDIR)/* $(AUTODOCDIR)
  20. # Catch-all target: route all unknown targets to Sphinx using the new
  21. # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
  22. %: Makefile
  23. @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)