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