source: trunk/docs/docs_dev/Makefile @ 628

Last change on this file since 628 was 628, checked in by pinsard, 11 years ago

add apidoc for python documentation generation, improve links

File size: 5.9 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 et la génération du
25# logo
26#
27#
28# EVOLUTIONS
29# ==========
30#
31# $Id: Makefile 30 2012-03-13 10:53:33Z pinsard $
32#
33# $URL: svn+ssh://pinsard@forge.ipsl.jussieu.fr/ipsl/forge/projets/fptools/svn/trunk/docs/docs_dev/Makefile $
34#
35# - fplod 20130731T144015Z cratos.locean-ipsl.upmc.fr (Linux)
36#
37#   * add apidoc
38#
39# - fplod 20120413
40#
41#   * update whith new sphinx backend
42#
43# - fplod 20120413T082638Z cratos (Linux)
44#
45#   * add header
46#-
47
48#
49# You can set these variables from the command line.
50SPHINXOPTS    =
51SPHINXBUILD   = sphinx-build
52PAPER         =
53BUILDDIR      = ../../doc/
54
55# Internal variables.
56PAPEROPT_a4     = -D latex_paper_size=a4
57PAPEROPT_letter = -D latex_paper_size=letter
58ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
59
60.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
61
62help:
63        @echo "Please use \`make <target>' where <target> is one of"
64        @echo "Please use \`make <target>' where <target> is one of"
65        @echo "  html       to make standalone HTML files"
66        @echo "  dirhtml    to make HTML files named index.html in directories"
67        @echo "  singlehtml to make a single large HTML file"
68        @echo "  pickle     to make pickle files"
69        @echo "  json       to make JSON files"
70        @echo "  htmlhelp   to make HTML files and a HTML help project"
71        @echo "  qthelp     to make HTML files and a qthelp project"
72        @echo "  devhelp    to make HTML files and a Devhelp project"
73        @echo "  epub       to make an epub"
74        @echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
75        @echo "  latexpdf   to make LaTeX files and run them through pdflatex"
76        @echo "  text       to make text files"
77        @echo "  man        to make manual pages"
78        @echo "  changes    to make an overview of all changed/added/deprecated items"
79        @echo "  linkcheck  to check all external links for integrity"
80        @echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
81
82clean:
83        @make -f makefile_non_sphinx clean
84        -rm -rf source/manuals/src/
85        -rm -rf $(BUILDDIR)/*
86
87apidoc :
88        sphinx-apidoc -f -H "varamma scripts" -o source/manuals/src/ ../../src/
89
90html: \
91apidoc
92        @make -f makefile_non_sphinx all
93        $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
94        @echo
95        @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
96
97dirhtml:
98        @make -f makefile_non_sphinx all
99        $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
100        @echo
101        @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
102
103singlehtml:
104        @make -f makefile_non_sphinx all
105        $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
106        @echo
107        @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
108
109pickle:
110        @make -f makefile_non_sphinx all
111        $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
112        @echo
113        @echo "Build finished; now you can process the pickle files."
114
115json:
116        @make -f makefile_non_sphinx all
117        $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
118        @echo
119        @echo "Build finished; now you can process the JSON files."
120
121htmlhelp:
122        @make -f makefile_non_sphinx all
123        $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
124        @echo
125        @echo "Build finished; now you can run HTML Help Workshop with the" \
126              ".hhp project file in $(BUILDDIR)/htmlhelp."
127
128qthelp:
129        @make -f makefile_non_sphinx all
130        $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
131        @echo
132        @echo "Build finished; now you can run "qcollectiongenerator" with the" \
133              ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
134        @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/VARAMMA.qhcp"
135        @echo "To view the help file:"
136        @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/VARAMMA.qhc"
137devhelp:
138        @make -f makefile_non_sphinx all
139        $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
140        @echo
141        @echo "Build finished."
142        @echo "To view the help file:"
143        @echo "# mkdir -p $$HOME/.local/share/devhelp/TROPFLUX"
144        @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/TROPFLUX"
145        @echo "# devhelp"
146
147epub:
148        @make -f makefile_non_sphinx all
149        $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
150        @echo
151        @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
152
153latex:
154        @make -f makefile_non_sphinx all
155        $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
156        @echo
157        @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
158        @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
159              "run these through (pdf)latex."
160
161latexpdf: \
162apidoc
163        @make -f makefile_non_sphinx all
164        $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
165        @echo "Running LaTeX files through pdflatex..."
166        make -C $(BUILDDIR)/latex all-pdf
167        @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
168
169text:
170        @make -f makefile_non_sphinx all
171        $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
172        @echo
173        @echo "Build finished. The text files are in $(BUILDDIR)/text."
174
175man:
176        @make -f makefile_non_sphinx all
177        $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
178        @echo
179        @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
180
181changes:
182        @make -f makefile_non_sphinx all
183        $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
184        @echo
185        @echo "The overview file is in $(BUILDDIR)/changes."
186
187linkcheck: \
188apidoc
189        @make -f makefile_non_sphinx all
190        $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
191        @echo
192        @echo "Link check complete; look for any errors in the above output " \
193              "or in $(BUILDDIR)/linkcheck/output.txt."
194
195doctest: 
196        @make -f makefile_non_sphinx all
197        $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
198        @echo "Testing of doctests in the sources finished, look at the " \
199              "results in $(BUILDDIR)/doctest/output.txt."
Note: See TracBrowser for help on using the repository browser.