Makefile (a64c0440dda1fff1fb5723140828983d0ca821d4) | Makefile (51e46c7a4007d271b2d42dbc2df953ab968577a7) |
---|---|
1# -*- makefile -*- 2# Makefile for Sphinx documentation 3# 4 5subdir-y := devicetree/bindings/ 6 7# Check for broken documentation file references 8ifeq ($(CONFIG_WARN_MISSING_DOCUMENTS),y) 9$(shell $(srctree)/scripts/documentation-file-ref-check --warn) 10endif 11 12# You can set these variables from the command line. 13SPHINXBUILD = sphinx-build 14SPHINXOPTS = 15SPHINXDIRS = . | 1# -*- makefile -*- 2# Makefile for Sphinx documentation 3# 4 5subdir-y := devicetree/bindings/ 6 7# Check for broken documentation file references 8ifeq ($(CONFIG_WARN_MISSING_DOCUMENTS),y) 9$(shell $(srctree)/scripts/documentation-file-ref-check --warn) 10endif 11 12# You can set these variables from the command line. 13SPHINXBUILD = sphinx-build 14SPHINXOPTS = 15SPHINXDIRS = . |
16_SPHINXDIRS = $(patsubst $(srctree)/Documentation/%/conf.py,%,$(wildcard $(srctree)/Documentation/*/conf.py)) | 16_SPHINXDIRS = $(patsubst $(srctree)/Documentation/%/index.rst,%,$(wildcard $(srctree)/Documentation/*/index.rst)) |
17SPHINX_CONF = conf.py 18PAPER = 19BUILDDIR = $(obj)/output 20PDFLATEX = xelatex 21LATEXOPTS = -interaction=batchmode 22 23# User-friendly check for sphinx-build 24HAVE_SPHINX := $(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi) 25 26ifeq ($(HAVE_SPHINX),0) 27 28.DEFAULT: 29 $(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.) 30 @echo 31 @$(srctree)/scripts/sphinx-pre-install 32 @echo " SKIP Sphinx $@ target." 33 34else # HAVE_SPHINX 35 | 17SPHINX_CONF = conf.py 18PAPER = 19BUILDDIR = $(obj)/output 20PDFLATEX = xelatex 21LATEXOPTS = -interaction=batchmode 22 23# User-friendly check for sphinx-build 24HAVE_SPHINX := $(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi) 25 26ifeq ($(HAVE_SPHINX),0) 27 28.DEFAULT: 29 $(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.) 30 @echo 31 @$(srctree)/scripts/sphinx-pre-install 32 @echo " SKIP Sphinx $@ target." 33 34else # HAVE_SPHINX 35 |
36export SPHINXOPTS = $(shell perl -e 'open IN,"sphinx-build --version 2>&1 |"; while (<IN>) { if (m/([\d\.]+)/) { print "-jauto" if ($$1 >= "1.7") } ;} close IN') 37 | |
38# User-friendly check for pdflatex and latexmk 39HAVE_PDFLATEX := $(shell if which $(PDFLATEX) >/dev/null 2>&1; then echo 1; else echo 0; fi) 40HAVE_LATEXMK := $(shell if which latexmk >/dev/null 2>&1; then echo 1; else echo 0; fi) 41 42ifeq ($(HAVE_LATEXMK),1) 43 PDFLATEX := latexmk -$(PDFLATEX) 44endif #HAVE_LATEXMK 45 --- 16 unchanged lines hidden (view full) --- 62# $4 dest subfolder e.g. "man" for man pages at media/man 63# $5 reST source folder relative to $(srctree)/$(src), 64# e.g. "media" for the linux-tv book-set at ./Documentation/media 65 66quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) 67 cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media $2 && \ 68 PYTHONDONTWRITEBYTECODE=1 \ 69 BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \ | 36# User-friendly check for pdflatex and latexmk 37HAVE_PDFLATEX := $(shell if which $(PDFLATEX) >/dev/null 2>&1; then echo 1; else echo 0; fi) 38HAVE_LATEXMK := $(shell if which latexmk >/dev/null 2>&1; then echo 1; else echo 0; fi) 39 40ifeq ($(HAVE_LATEXMK),1) 41 PDFLATEX := latexmk -$(PDFLATEX) 42endif #HAVE_LATEXMK 43 --- 16 unchanged lines hidden (view full) --- 60# $4 dest subfolder e.g. "man" for man pages at media/man 61# $5 reST source folder relative to $(srctree)/$(src), 62# e.g. "media" for the linux-tv book-set at ./Documentation/media 63 64quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) 65 cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media $2 && \ 66 PYTHONDONTWRITEBYTECODE=1 \ 67 BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \ |
68 $(PYTHON) $(srctree)/scripts/jobserver-exec \ 69 $(SHELL) $(srctree)/Documentation/sphinx/parallel-wrapper.sh \ |
|
70 $(SPHINXBUILD) \ 71 -b $2 \ 72 -c $(abspath $(srctree)/$(src)) \ 73 -d $(abspath $(BUILDDIR)/.doctrees/$3) \ 74 -D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \ 75 $(ALLSPHINXOPTS) \ 76 $(abspath $(srctree)/$(src)/$5) \ 77 $(abspath $(BUILDDIR)/$3/$4) --- 45 unchanged lines hidden (view full) --- 123 124dochelp: 125 @echo ' Linux kernel internal documentation in different formats from ReST:' 126 @echo ' htmldocs - HTML' 127 @echo ' latexdocs - LaTeX' 128 @echo ' pdfdocs - PDF' 129 @echo ' epubdocs - EPUB' 130 @echo ' xmldocs - XML' | 70 $(SPHINXBUILD) \ 71 -b $2 \ 72 -c $(abspath $(srctree)/$(src)) \ 73 -d $(abspath $(BUILDDIR)/.doctrees/$3) \ 74 -D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \ 75 $(ALLSPHINXOPTS) \ 76 $(abspath $(srctree)/$(src)/$5) \ 77 $(abspath $(BUILDDIR)/$3/$4) --- 45 unchanged lines hidden (view full) --- 123 124dochelp: 125 @echo ' Linux kernel internal documentation in different formats from ReST:' 126 @echo ' htmldocs - HTML' 127 @echo ' latexdocs - LaTeX' 128 @echo ' pdfdocs - PDF' 129 @echo ' epubdocs - EPUB' 130 @echo ' xmldocs - XML' |
131 @echo ' linkcheckdocs - check for broken external links' 132 @echo ' (will connect to external hosts)' 133 @echo ' refcheckdocs - check for references to non-existing files under' 134 @echo ' Documentation' | 131 @echo ' linkcheckdocs - check for broken external links (will connect to external hosts)' 132 @echo ' refcheckdocs - check for references to non-existing files under Documentation' |
135 @echo ' cleandocs - clean all generated files' 136 @echo 137 @echo ' make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2' 138 @echo ' valid values for SPHINXDIRS are: $(_SPHINXDIRS)' 139 @echo 140 @echo ' make SPHINX_CONF={conf-file} [target] use *additional* sphinx-build' 141 @echo ' configuration. This is e.g. useful to build with nit-picking config.' 142 @echo 143 @echo ' Default location for the generated documents is Documentation/output' | 133 @echo ' cleandocs - clean all generated files' 134 @echo 135 @echo ' make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2' 136 @echo ' valid values for SPHINXDIRS are: $(_SPHINXDIRS)' 137 @echo 138 @echo ' make SPHINX_CONF={conf-file} [target] use *additional* sphinx-build' 139 @echo ' configuration. This is e.g. useful to build with nit-picking config.' 140 @echo 141 @echo ' Default location for the generated documents is Documentation/output' |