source: trunk/docs/docs_dev/Makefile @ 157

Last change on this file since 157 was 157, checked in by pinsard, 12 years ago

first step of a better usage of sphinx for doc dev

File size: 5.4 KB
Line 
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# You can set these variables from the command line.
39SPHINXOPTS    =
40SPHINXBUILD   = sphinx-build
41PAPER         =
42BUILDDIR      = _build
43
44# Internal variables.
45PAPEROPT_a4     = -D latex_paper_size=a4
46PAPEROPT_letter = -D latex_paper_size=letter
47ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
48
49.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
50
51help:
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
70clean:
71        @make -f makefile_non_sphinx clean
72        -rm -rf $(BUILDDIR)/*
73
74html:
75        @make -f makefile_non_sphinx all
76        $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
77        @echo
78        @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
79
80dirhtml:
81        @make -f makefile_non_sphinx all
82        $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
83        @echo
84        @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
85
86singlehtml:
87        @make -f makefile_non_sphinx all
88        $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
89        @echo
90        @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
91
92pickle:
93        @make -f makefile_non_sphinx all
94        $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
95        @echo
96        @echo "Build finished; now you can process the pickle files."
97
98json:
99        @make -f makefile_non_sphinx all
100        $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
101        @echo
102        @echo "Build finished; now you can process the JSON files."
103
104htmlhelp:
105        @make -f makefile_non_sphinx all
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
111qthelp:
112        @make -f makefile_non_sphinx all
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:"
117        @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/TROPFLUX.qhcp"
118        @echo "To view the help file:"
119        @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/TROPFLUX.qhc"
120
121devhelp:
122        @make -f makefile_non_sphinx all
123        $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
124        @echo
125        @echo "Build finished."
126        @echo "To view the help file:"
127        @echo "# mkdir -p $$HOME/.local/share/devhelp/TROPFLUX"
128        @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/TROPFLUX"
129        @echo "# devhelp"
130
131epub:
132        @make -f makefile_non_sphinx all
133        $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
134        @echo
135        @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
136
137latex:
138        @make -f makefile_non_sphinx all
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
145latexpdf:
146        @make -f makefile_non_sphinx all
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
152text:
153        @make -f makefile_non_sphinx all
154        $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
155        @echo
156        @echo "Build finished. The text files are in $(BUILDDIR)/text."
157
158man:
159        @make -f makefile_non_sphinx all
160        $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
161        @echo
162        @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
163
164changes:
165        @make -f makefile_non_sphinx all
166        $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
167        @echo
168        @echo "The overview file is in $(BUILDDIR)/changes."
169
170linkcheck:
171        @make -f makefile_non_sphinx all
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
177doctest:
178        @make -f makefile_non_sphinx all
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."
Note: See TracBrowser for help on using the repository browser.