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