ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R# User-friendly check for sphinx-build
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.Rifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R$(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/)
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R# Internal variables.
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.RPAPEROPT_a4 = -D latex_paper_size=a4
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.RPAPEROPT_letter = -D latex_paper_size=letter
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.RALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R# the i18n builder cannot share the environment and doctrees with the others
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.RI18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Please use \`make <target>' where <target> is one of"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo " dirhtml to make HTML files named index.html in directories"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo " singlehtml to make a single large HTML file"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo " htmlhelp to make HTML files and a HTML help project"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo " qthelp to make HTML files and a qthelp project"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo " devhelp to make HTML files and a Devhelp project"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo " latexpdf to make LaTeX files and run them through pdflatex"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo " info to make Texinfo files and run them through makeinfo"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo " changes to make an overview of all changed/added/deprecated items"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo " pseudoxml to make pseudoxml-XML files for display purposes"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo " linkcheck to check all external links for integrity"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo " doctest to run all doctests embedded in the documentation (if enabled)"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo " coverage to run coverage check of the documentation (if enabled)"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished; now you can process the pickle files."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished; now you can process the JSON files."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished; now you can run HTML Help Workshop with the" \
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished; now you can run "qcollectiongenerator" with the" \
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Nexus.qhcp"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Nexus.qhc"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "N.B. You won't be able to view it unless you put it in" \
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R "~/Library/Documentation/Help or install it in your application" \
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "# mkdir -p $$HOME/.local/share/devhelp/Nexus"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Nexus"
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Run \`make' in that directory to run these through (pdf)latex" \
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R "(use \`make latexpdf' here to do that automatically)."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Running LaTeX files through pdflatex..."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Running LaTeX files through platex and dvipdfmx..."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished. The text files are in $(BUILDDIR)/text."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Run \`make' in that directory to run these through makeinfo" \
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R "(use \`make info' here to do that automatically)."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Running Texinfo files through makeinfo..."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "The overview file is in $(BUILDDIR)/changes."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Link check complete; look for any errors in the above output " \
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Testing of doctests in the sources finished, look at the " \
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Testing of coverage in the sources finished, look at the " \
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
ee1e4c0fa7e8a973ecf16b7535664b8f47fc7e75Niranjan M.R @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."