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