/doc/Makefile

https://gitlab.com/vote539/ase · Makefile · 49 lines · 34 code · 9 blank · 6 comment · 2 complexity · 2cbadb42c2c502add66214a68f232fa7 MD5 · raw file

  1. # Makefile for Sphinx documentation
  2. #
  3. # You can set these variables from the command line.
  4. SPHINXOPTS =
  5. SPHINXBUILD = sphinx-build
  6. PAPER =
  7. BUILDDIR = build
  8. # User-friendly check for sphinx-build
  9. ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
  10. $(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/)
  11. endif
  12. # Internal variables.
  13. PAPEROPT_a4 = -D latex_paper_size=a4
  14. PAPEROPT_letter = -D latex_paper_size=letter
  15. ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
  16. # the i18n builder cannot share the environment and doctrees with the others
  17. I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
  18. .PHONY: help clean html latex linkcheck
  19. html:
  20. $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
  21. @echo
  22. @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
  23. help:
  24. @echo "Use \`make <target>' where <target> is one of"
  25. @echo " html to make standalone HTML files"
  26. @echo " latexpdf to make LaTeX files and run them through pdflatex"
  27. @echo " linkcheck to check all external links for integrity"
  28. @echo " clean to clean up"
  29. latex:
  30. $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
  31. @echo "Running LaTeX files through pdflatex..."
  32. $(MAKE) -C $(BUILDDIR)/latex all-pdf
  33. @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
  34. clean:
  35. rm -rf $(BUILDDIR)/*
  36. linkcheck:
  37. $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
  38. @echo
  39. @echo "Link check complete; look for any errors in the above output " \
  40. "or in $(BUILDDIR)/linkcheck/output.txt."