1 1.1 mrg # Makefile for Sphinx documentation 2 1.1 mrg # 3 1.1 mrg 4 1.1 mrg # You can set these variables from the command line. 5 1.1 mrg SPHINXOPTS = 6 1.1 mrg SPHINXBUILD = sphinx-build 7 1.1 mrg PAPER = 8 1.1 mrg BUILDDIR = _build 9 1.1 mrg 10 1.1 mrg # Internal variables. 11 1.1 mrg PAPEROPT_a4 = -D latex_paper_size=a4 12 1.1 mrg PAPEROPT_letter = -D latex_paper_size=letter 13 1.1 mrg ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 14 1.1 mrg # the i18n builder cannot share the environment and doctrees with the others 15 1.1 mrg I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 16 1.1 mrg 17 1.1 mrg .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 18 1.1 mrg 19 1.1 mrg help: 20 1.1 mrg @echo "Please use \`make <target>' where <target> is one of" 21 1.1 mrg @echo " html to make standalone HTML files" 22 1.1 mrg @echo " dirhtml to make HTML files named index.html in directories" 23 1.1 mrg @echo " singlehtml to make a single large HTML file" 24 1.1 mrg @echo " pickle to make pickle files" 25 1.1 mrg @echo " json to make JSON files" 26 1.1 mrg @echo " htmlhelp to make HTML files and a HTML help project" 27 1.1 mrg @echo " qthelp to make HTML files and a qthelp project" 28 1.1 mrg @echo " devhelp to make HTML files and a Devhelp project" 29 1.1 mrg @echo " epub to make an epub" 30 1.1 mrg @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 31 1.1 mrg @echo " latexpdf to make LaTeX files and run them through pdflatex" 32 1.1 mrg @echo " text to make text files" 33 1.1 mrg @echo " man to make manual pages" 34 1.1 mrg @echo " texinfo to make Texinfo files" 35 1.1 mrg @echo " info to make Texinfo files and run them through makeinfo" 36 1.1 mrg @echo " gettext to make PO message catalogs" 37 1.1 mrg @echo " changes to make an overview of all changed/added/deprecated items" 38 1.1 mrg @echo " linkcheck to check all external links for integrity" 39 1.1 mrg @echo " doctest to run all doctests embedded in the documentation (if enabled)" 40 1.1 mrg 41 1.1 mrg clean: 42 1.1 mrg -rm -rf $(BUILDDIR)/* 43 1.1 mrg 44 1.1 mrg html: 45 1.1 mrg $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 46 1.1 mrg @echo 47 1.1 mrg @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 48 1.1 mrg 49 1.1 mrg dirhtml: 50 1.1 mrg $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 51 1.1 mrg @echo 52 1.1 mrg @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 53 1.1 mrg 54 1.1 mrg singlehtml: 55 1.1 mrg $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 56 1.1 mrg @echo 57 1.1 mrg @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 58 1.1 mrg 59 1.1 mrg pickle: 60 1.1 mrg $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 61 1.1 mrg @echo 62 1.1 mrg @echo "Build finished; now you can process the pickle files." 63 1.1 mrg 64 1.1 mrg json: 65 1.1 mrg $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 66 1.1 mrg @echo 67 1.1 mrg @echo "Build finished; now you can process the JSON files." 68 1.1 mrg 69 1.1 mrg htmlhelp: 70 1.1 mrg $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 71 1.1 mrg @echo 72 1.1 mrg @echo "Build finished; now you can run HTML Help Workshop with the" \ 73 1.1 mrg ".hhp project file in $(BUILDDIR)/htmlhelp." 74 1.1 mrg 75 1.1 mrg qthelp: 76 1.1 mrg $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 77 1.1 mrg @echo 78 1.1 mrg @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 79 1.1 mrg ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 80 1.1 mrg @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/libgccjit.qhcp" 81 1.1 mrg @echo "To view the help file:" 82 1.1 mrg @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/libgccjit.qhc" 83 1.1 mrg 84 1.1 mrg devhelp: 85 1.1 mrg $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 86 1.1 mrg @echo 87 1.1 mrg @echo "Build finished." 88 1.1 mrg @echo "To view the help file:" 89 1.1 mrg @echo "# mkdir -p $$HOME/.local/share/devhelp/libgccjit" 90 1.1 mrg @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/libgccjit" 91 1.1 mrg @echo "# devhelp" 92 1.1 mrg 93 1.1 mrg epub: 94 1.1 mrg $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 95 1.1 mrg @echo 96 1.1 mrg @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 97 1.1 mrg 98 1.1 mrg latex: 99 1.1 mrg $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 100 1.1 mrg @echo 101 1.1 mrg @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 102 1.1 mrg @echo "Run \`make' in that directory to run these through (pdf)latex" \ 103 1.1 mrg "(use \`make latexpdf' here to do that automatically)." 104 1.1 mrg 105 1.1 mrg latexpdf: 106 1.1 mrg $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 107 1.1 mrg @echo "Running LaTeX files through pdflatex..." 108 1.1 mrg $(MAKE) -C $(BUILDDIR)/latex all-pdf 109 1.1 mrg @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 110 1.1 mrg 111 1.1 mrg text: 112 1.1 mrg $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 113 1.1 mrg @echo 114 1.1 mrg @echo "Build finished. The text files are in $(BUILDDIR)/text." 115 1.1 mrg 116 1.1 mrg man: 117 1.1 mrg $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 118 1.1 mrg @echo 119 1.1 mrg @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 120 1.1 mrg 121 1.1 mrg texinfo: 122 1.1 mrg $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 123 1.1 mrg @echo 124 1.1 mrg @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 125 1.1 mrg @echo "Run \`make' in that directory to run these through makeinfo" \ 126 1.1 mrg "(use \`make info' here to do that automatically)." 127 1.1 mrg 128 1.1 mrg info: 129 1.1 mrg $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 130 1.1 mrg @echo "Running Texinfo files through makeinfo..." 131 1.1 mrg make -C $(BUILDDIR)/texinfo info 132 1.1 mrg @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 133 1.1 mrg 134 1.1 mrg gettext: 135 1.1 mrg $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 136 1.1 mrg @echo 137 1.1 mrg @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 138 1.1 mrg 139 1.1 mrg changes: 140 1.1 mrg $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 141 1.1 mrg @echo 142 1.1 mrg @echo "The overview file is in $(BUILDDIR)/changes." 143 1.1 mrg 144 1.1 mrg linkcheck: 145 1.1 mrg $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 146 1.1 mrg @echo 147 1.1 mrg @echo "Link check complete; look for any errors in the above output " \ 148 1.1 mrg "or in $(BUILDDIR)/linkcheck/output.txt." 149 1.1 mrg 150 1.1 mrg doctest: 151 1.1 mrg $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 152 1.1 mrg @echo "Testing of doctests in the sources finished, look at the " \ 153 1.1 mrg "results in $(BUILDDIR)/doctest/output.txt." 154