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