Onl allow "man" if sphinx-build actually supports it.
[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 sphinx-help:
22 @echo "Please use \`make <target>' where <target> is one of"
23 @echo " html to make standalone HTML files"
24 @echo " dirhtml to make HTML files named index.html in directories"
25 @echo " singlehtml to make a single large HTML file"
26 @echo " pickle to make pickle files"
27 @echo " json to make JSON files"
28 @echo " htmlhelp to make HTML files and a HTML help project"
29 @echo " qthelp to make HTML files and a qthelp project"
30 @echo " devhelp to make HTML files and a Devhelp project"
31 @echo " epub to make an epub"
32 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
33 @echo " latexpdf to make LaTeX files and run them through pdflatex"
34 @echo " text to make text files"
35 @echo " man to make manual pages"
36 @echo " changes to make an overview of all changed/added/deprecated items"
37 @echo " linkcheck to check all external links for integrity"
38 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
39
40 install-html: html-local
41 @rm -r -f /var/www/libmemcached/*
42 @cp -r docs/html /var/www/libmemcached
43
44 docs/_static:
45 @$(mkdir_p) docs/_static
46
47 html-local: docs/conf.py docs changes docs/_static
48 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/html
49 @echo
50 @echo "Build finished. The HTML pages are in $(SPHINX_BUILDDIR)/html."
51
52 dirhtml: html-local
53 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/dirhtml
54 @echo
55 @echo "Build finished. The HTML pages are in $(SPHINX_BUILDDIR)/dirhtml."
56
57 singlehtml: html-local
58 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/singlehtml
59 @echo
60 @echo "Build finished. The HTML page is in $(SPHINX_BUILDDIR)/singlehtml."
61
62 pickle: docs/conf.py changes
63 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/pickle
64 @echo
65 @echo "Build finished; now you can process the pickle files."
66
67 json: docs/conf.py changes
68 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/json
69 @echo
70 @echo "Build finished; now you can process the JSON files."
71
72 htmlhelp: docs/conf.py changes
73 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/htmlhelp
74 @echo
75 @echo "Build finished; now you can run HTML Help Workshop with the" \
76 ".hhp project file in $(SPHINX_BUILDDIR)/htmlhelp."
77
78 qthelp: docs/conf.py changes
79 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/qthelp
80 @echo
81 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
82 ".qhcp project file in $(SPHINX_BUILDDIR)/qthelp, like this:"
83 @echo "# qcollectiongenerator $(SPHINX_BUILDDIR)/qthelp/Libmemcached.qhcp"
84 @echo "To view the help file:"
85 @echo "# assistant -collectionFile $(SPHINX_BUILDDIR)/qthelp/Libmemcached.qhc"
86
87 devhelp: docs/conf.py changes
88 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/devhelp
89 @echo
90 @echo "Build finished."
91 @echo "To view the help file:"
92 @echo "# mkdir -p $$HOME/.local/share/devhelp/Libmemcached"
93 @echo "# ln -s $(SPHINX_BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Libmemcached"
94 @echo "# devhelp"
95
96 epub: docs/conf.py changes
97 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/epub
98 @echo
99 @echo "Build finished. The epub file is in $(SPHINX_BUILDDIR)/epub."
100
101 latex: docs/conf.py changes
102 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex
103 @echo
104 @echo "Build finished; the LaTeX files are in $(SPHINX_BUILDDIR)/latex."
105 @echo "Run \`make' in that directory to run these through (pdf)latex" \
106 "(use \`make latexpdf' here to do that automatically)."
107
108 latexpdf: latex changes
109 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex
110 @echo "Running LaTeX files through pdflatex..."
111 make -C $(SPHINX_BUILDDIR)/latex all-pdf
112 @echo "pdflatex finished; the PDF files are in $(SPHINX_BUILDDIR)/latex."
113
114 text: docs/conf.py changes
115 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/text
116 @echo
117 @echo "Build finished. The text files are in $(SPHINX_BUILDDIR)/text."
118
119 if HAVE_RECENT_SPHINX
120 man:
121 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) ${top_srcdir}/man
122 @echo
123 @echo "Build finished. The manual pages are in ${top_srcdir}/man."
124
125 else
126
127 man:
128
129 endif
130
131 changes: docs/conf.py linkcheck
132 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/changes
133 @echo
134 @echo "The overview file is in $(SPHINX_BUILDDIR)/changes."
135
136 linkcheck: docs/conf.py
137 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/linkcheck
138 @echo
139 @echo "Link check complete; look for any errors in the above output " \
140 "or in $(SPHINX_BUILDDIR)/linkcheck/output.txt."
141
142 doctest:
143 PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/doctest
144 @echo "Testing of doctests in the sources finished, look at the " \
145 "results in $(SPHINX_BUILDDIR)/doctest/output.txt."
146
147 endif