c1275500eac4999fcd219c597a6694b31724363f
[awesomized/libmemcached] / docs / include.am
1 # vim:ft=automake
2 # included from Top Level Makefile.am
3 # All paths should be given relative to the root
4
5 # Makefile for Sphinx documentation
6 #
7
8 SPHINXOPTS = ${SPHINX_WARNINGS}
9 PAPER =
10 SPHINX_BUILDDIR = ${top_builddir}/docs
11
12 # Internal variables.
13 PAPEROPT_a4 = -D latex_paper_size=a4
14 PAPEROPT_letter = -D latex_paper_size=letter
15 ALLSPHINXOPTS = -d $(SPHINX_BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ${top_srcdir}/docs
16
17 .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
18
19 if HAVE_SPHINX
20
21 docs: html man
22
23 sphinx-help:
24 @echo "Please use \`make <target>' where <target> is one of"
25 @echo " html to make standalone HTML files"
26 @echo " dirhtml to make HTML files named index.html in directories"
27 @echo " singlehtml to make a single large HTML file"
28 @echo " pickle to make pickle files"
29 @echo " json to make JSON files"
30 @echo " htmlhelp to make HTML files and a HTML help project"
31 @echo " qthelp to make HTML files and a qthelp project"
32 @echo " devhelp to make HTML files and a Devhelp project"
33 @echo " epub to make an epub"
34 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
35 @echo " latexpdf to make LaTeX files and run them through pdflatex"
36 @echo " text to make text files"
37 @echo " man to make manual pages"
38 @echo " changes to make an overview of all changed/added/deprecated items"
39 @echo " linkcheck to check all external links for integrity"
40 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
41
42 install-html: html-local
43 @rm -r -f /var/www/libmemcached/*
44 @cp -r docs/html /var/www/libmemcached
45
46 docs/_static:
47 @$(mkdir_p) docs/_static
48
49 html-local: docs/conf.py docs changes docs/_static
50 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/html
51 @echo
52 @echo "Build finished. The HTML pages are in $(SPHINX_BUILDDIR)/html."
53
54 dirhtml: html-local
55 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/dirhtml
56 @echo
57 @echo "Build finished. The HTML pages are in $(SPHINX_BUILDDIR)/dirhtml."
58
59 singlehtml: html-local
60 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/singlehtml
61 @echo
62 @echo "Build finished. The HTML page is in $(SPHINX_BUILDDIR)/singlehtml."
63
64 pickle: docs/conf.py changes
65 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/pickle
66 @echo
67 @echo "Build finished; now you can process the pickle files."
68
69 json: docs/conf.py changes
70 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/json
71 @echo
72 @echo "Build finished; now you can process the JSON files."
73
74 htmlhelp: docs/conf.py changes
75 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/htmlhelp
76 @echo
77 @echo "Build finished; now you can run HTML Help Workshop with the" \
78 ".hhp project file in $(SPHINX_BUILDDIR)/htmlhelp."
79
80 qthelp: docs/conf.py changes
81 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/qthelp
82 @echo
83 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
84 ".qhcp project file in $(SPHINX_BUILDDIR)/qthelp, like this:"
85 @echo "# qcollectiongenerator $(SPHINX_BUILDDIR)/qthelp/Libmemcached.qhcp"
86 @echo "To view the help file:"
87 @echo "# assistant -collectionFile $(SPHINX_BUILDDIR)/qthelp/Libmemcached.qhc"
88
89 devhelp: docs/conf.py changes
90 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/devhelp
91 @echo
92 @echo "Build finished."
93 @echo "To view the help file:"
94 @echo "# mkdir -p $$HOME/.local/share/devhelp/Libmemcached"
95 @echo "# ln -s $(SPHINX_BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Libmemcached"
96 @echo "# devhelp"
97
98 epub: docs/conf.py changes
99 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/epub
100 @echo
101 @echo "Build finished. The epub file is in $(SPHINX_BUILDDIR)/epub."
102
103 latex: docs/conf.py changes
104 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex
105 @echo
106 @echo "Build finished; the LaTeX files are in $(SPHINX_BUILDDIR)/latex."
107 @echo "Run \`make' in that directory to run these through (pdf)latex" \
108 "(use \`make latexpdf' here to do that automatically)."
109
110 latexpdf: latex changes
111 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex
112 @echo "Running LaTeX files through pdflatex..."
113 make -C $(SPHINX_BUILDDIR)/latex all-pdf
114 @echo "pdflatex finished; the PDF files are in $(SPHINX_BUILDDIR)/latex."
115
116 text: docs/conf.py changes
117 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/text
118 @echo
119 @echo "Build finished. The text files are in $(SPHINX_BUILDDIR)/text."
120
121 man: docs/conf.py changes
122 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) ${top_srcdir}/man
123 @echo
124 @echo "Build finished. The manual pages are in ${top_srcdir}/man."
125
126 changes: docs/conf.py linkcheck
127 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/changes
128 @echo
129 @echo "The overview file is in $(SPHINX_BUILDDIR)/changes."
130
131 linkcheck: docs/conf.py
132 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/linkcheck
133 @echo
134 @echo "Link check complete; look for any errors in the above output " \
135 "or in $(SPHINX_BUILDDIR)/linkcheck/output.txt."
136
137 doctest:
138 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/doctest
139 @echo "Testing of doctests in the sources finished, look at the " \
140 "results in $(SPHINX_BUILDDIR)/doctest/output.txt."
141
142 endif