]>
git.proxmox.com Git - mirror_frr.git/blob - doc/frr-sphinx.mk
1 # Makefile for Sphinx documentation
4 # Sphinx is not designed to be invoked multiple times against the same toctree.
7 # You can set these variables from the command line.
9 SPHINXBUILD ?
= sphinx-build
13 # This is a custom FRR variable just for this docs subdirectory used to support
14 # VPATH builds. Makefiles which include this file should override it to point
15 # to the correct sources path.
18 # User-friendly check for sphinx-build
19 ifneq ($( MAKECMDGOALS
), clean )
20 ifeq ($( shell which
$( SPHINXBUILD
) >/ dev
/ null
2 >& 1 ; echo
$$ ?
), 1 )
21 SPHINXBUILD
= sphinx-1.0
- build
23 ifeq ($( shell which
$( SPHINXBUILD
) >/ dev
/ null
2 >& 1 ; echo
$$ ?
), 1 )
24 $( error
"The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/" )
29 PAPEROPT_a4
= - D latex_paper_size
= a4
30 PAPEROPT_letter
= - D latex_paper_size
= letter
31 ALLSPHINXOPTS
= - d
$( BUILDDIR
)/ doctrees
$( PAPEROPT_
$( PAPER
)) $( SPHINXOPTS
) $( SOURCESDIR
)
32 # the i18n builder cannot share the environment and doctrees with the others
33 I18NSPHINXOPTS
= $( PAPEROPT_
$( PAPER
)) $( SPHINXOPTS
) $( SOURCESDIR
)
37 @echo
"Please use \`make <target>' where <target> is one of"
38 @echo
" html to make standalone HTML files"
39 @echo
" dirhtml to make HTML files named index.html in directories"
40 @echo
" singlehtml to make a single large HTML file"
41 @echo
" pickle to make pickle files"
42 @echo
" json to make JSON files"
43 @echo
" htmlhelp to make HTML files and a HTML help project"
44 @echo
" qthelp to make HTML files and a qthelp project"
45 @echo
" applehelp to make an Apple Help Book"
46 @echo
" devhelp to make HTML files and a Devhelp project"
47 @echo
" epub to make an epub"
48 @echo
" latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
49 @echo
" latexpdf to make LaTeX files and run them through pdflatex"
50 @echo
" latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
51 @echo
" text to make text files"
52 @echo
" man to make manual pages"
53 @echo
" texinfo to make Texinfo files"
54 @echo
" info to make Texinfo files and run them through makeinfo"
55 @echo
" gettext to make PO message catalogs"
56 @echo
" changes to make an overview of all changed/added/deprecated items"
57 @echo
" xml to make Docutils-native XML files"
58 @echo
" pseudoxml to make pseudoxml-XML files for display purposes"
59 @echo
" linkcheck to check all external links for integrity"
60 @echo
" doctest to run all doctests embedded in the documentation (if enabled)"
61 @echo
" coverage to run coverage check of the documentation (if enabled)"
69 $( SPHINXBUILD
) - b html
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ html
71 @echo
"Build finished. The HTML pages are in $(BUILDDIR)/html."
75 $( SPHINXBUILD
) - b dirhtml
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ dirhtml
77 @echo
"Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
81 $( SPHINXBUILD
) - b singlehtml
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ singlehtml
83 @echo
"Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
87 $( SPHINXBUILD
) - b pickle
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ pickle
89 @echo
"Build finished; now you can process the pickle files."
93 $( SPHINXBUILD
) - b json
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ json
95 @echo
"Build finished; now you can process the JSON files."
99 $( SPHINXBUILD
) - b htmlhelp
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ htmlhelp
101 @echo
"Build finished; now you can run HTML Help Workshop with the" \
102 ".hhp project file in $(BUILDDIR)/htmlhelp."
106 $( SPHINXBUILD
) - b qthelp
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ qthelp
108 @echo
"Build finished; now you can run " qcollectiongenerator
" with the" \
109 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
110 @echo
"# qcollectiongenerator $(BUILDDIR)/qthelp/FRR.qhcp"
111 @echo
"To view the help file:"
112 @echo
"# assistant -collectionFile $(BUILDDIR)/qthelp/FRR.qhc"
116 $( SPHINXBUILD
) - b applehelp
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ applehelp
118 @echo
"Build finished. The help book is in $(BUILDDIR)/applehelp."
119 @echo
"N.B. You won't be able to view it unless you put it in" \
120 "~/Library/Documentation/Help or install it in your application" \
125 $( SPHINXBUILD
) - b devhelp
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ devhelp
127 @echo
"Build finished."
128 @echo
"To view the help file:"
129 @echo
"# mkdir -p $$HOME/.local/share/devhelp/FRR"
130 @echo
"# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/FRR"
135 $( SPHINXBUILD
) - b epub
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ epub
137 @echo
"Build finished. The epub file is in $(BUILDDIR)/epub."
141 $( SPHINXBUILD
) - b latex
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ latex
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)."
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."
156 $( SPHINXBUILD
) - b latex
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ latex
157 @echo
"Running LaTeX files through platex and dvipdfmx..."
158 $( MAKE
) - C
$( BUILDDIR
)/ latex all-pdf-ja
159 @echo
"pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
163 $( SPHINXBUILD
) - b text
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ text
165 @echo
"Build finished. The text files are in $(BUILDDIR)/text."
169 $( SPHINXBUILD
) - b man
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ man
171 @echo
"Build finished. The manual pages are in $(BUILDDIR)/man."
175 $( SPHINXBUILD
) - b texinfo
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ texinfo
177 @echo
"Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
178 @echo
"Run \`make' in that directory to run these through makeinfo" \
179 "(use \`make info' here to do that automatically)."
183 $( SPHINXBUILD
) - b texinfo
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ texinfo
184 @echo
"Running Texinfo files through makeinfo..."
185 $( MAKE
) - C
$( BUILDDIR
)/ texinfo
info
186 @echo
"makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
190 $( SPHINXBUILD
) - b gettext
$( I18NSPHINXOPTS
) $( BUILDDIR
)/ locale
192 @echo
"Build finished. The message catalogs are in $(BUILDDIR)/locale."
196 $( SPHINXBUILD
) - b changes
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ changes
198 @echo
"The overview file is in $(BUILDDIR)/changes."
202 $( SPHINXBUILD
) - b linkcheck
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ linkcheck
204 @echo
"Link check complete; look for any errors in the above output " \
205 "or in $(BUILDDIR)/linkcheck/output.txt."
209 $( SPHINXBUILD
) - b doctest
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ doctest
210 @echo
"Testing of doctests in the sources finished, look at the " \
211 "results in $(BUILDDIR)/doctest/output.txt."
215 $( SPHINXBUILD
) - b coverage
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ coverage
216 @echo
"Testing of coverage in the sources finished, look at the " \
217 "results in $(BUILDDIR)/coverage/python.txt."
221 $( SPHINXBUILD
) - b xml
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ xml
223 @echo
"Build finished. The XML files are in $(BUILDDIR)/xml."
227 $( SPHINXBUILD
) - b pseudoxml
$( ALLSPHINXOPTS
) $( BUILDDIR
)/ pseudoxml
229 @echo
"Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."