]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - Documentation/Makefile.sphinx
doc-rst: remove an invalid include from the docs
[mirror_ubuntu-zesty-kernel.git] / Documentation / Makefile.sphinx
CommitLineData
22cba31b
JN
1# -*- makefile -*-
2# Makefile for Sphinx documentation
3#
4
5# You can set these variables from the command line.
6SPHINXBUILD = sphinx-build
7SPHINXOPTS =
8PAPER =
9BUILDDIR = $(obj)/output
10
11# User-friendly check for sphinx-build
12HAVE_SPHINX := $(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi)
13
14ifeq ($(HAVE_SPHINX),0)
15
16.DEFAULT:
17 $(warning The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable.)
18 @echo " SKIP Sphinx $@ target."
19
20else # HAVE_SPHINX
21
22# User-friendly check for rst2pdf
23HAVE_RST2PDF := $(shell if python -c "import rst2pdf" >/dev/null 2>&1; then echo 1; else echo 0; fi)
24
25# Internal variables.
26PAPEROPT_a4 = -D latex_paper_size=a4
27PAPEROPT_letter = -D latex_paper_size=letter
24dcdeb2
JN
28KERNELDOC = $(srctree)/scripts/kernel-doc
29KERNELDOC_CONF = -D kerneldoc_srctree=$(srctree) -D kerneldoc_bin=$(KERNELDOC)
c13ce448 30ALLSPHINXOPTS = -D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) -d $(BUILDDIR)/.doctrees $(KERNELDOC_CONF) $(PAPEROPT_$(PAPER)) -c $(srctree)/$(src) $(SPHINXOPTS) $(srctree)/$(src)
22cba31b
JN
31# the i18n builder cannot share the environment and doctrees with the others
32I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
33
34quiet_cmd_sphinx = SPHINX $@
627e32df 35 cmd_sphinx = BUILDDIR=$(BUILDDIR) $(SPHINXBUILD) -b $2 $(ALLSPHINXOPTS) $(BUILDDIR)/$2
22cba31b
JN
36
37htmldocs:
627e32df 38 $(MAKE) BUILDDIR=$(BUILDDIR) -f $(srctree)/Documentation/linux_tv/Makefile $@
22cba31b
JN
39 $(call cmd,sphinx,html)
40
41pdfdocs:
42ifeq ($(HAVE_RST2PDF),0)
43 $(warning The Python 'rst2pdf' module was not found. Make sure you have the module installed to produce PDF output.)
44 @echo " SKIP Sphinx $@ target."
45else # HAVE_RST2PDF
46 $(call cmd,sphinx,pdf)
47endif # HAVE_RST2PDF
48
49epubdocs:
50 $(call cmd,sphinx,epub)
51
52xmldocs:
53 $(call cmd,sphinx,xml)
54
55# no-ops for the Sphinx toolchain
56sgmldocs:
57psdocs:
58mandocs:
59installmandocs:
60
61cleandocs:
62 $(Q)rm -rf $(BUILDDIR)
63
ebc88ef0
JN
64dochelp:
65 @echo ' Linux kernel internal documentation in different formats (Sphinx):'
66 @echo ' htmldocs - HTML'
67 @echo ' pdfdocs - PDF'
68 @echo ' epubdocs - EPUB'
69 @echo ' xmldocs - XML'
70 @echo ' cleandocs - clean all generated files'
71
22cba31b 72endif # HAVE_SPHINX