Merge branch 'ben' into docs-next
Ben writes: "This series fixes some bugs I found in the new doc build system."
This commit is contained in:
commit
f161e9a270
|
@ -43,7 +43,7 @@ ALLSPHINXOPTS = $(KERNELDOC_CONF) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS)
|
||||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||||
|
|
||||||
# commands; the 'cmd' from scripts/Kbuild.include is not *loopable*
|
# commands; the 'cmd' from scripts/Kbuild.include is not *loopable*
|
||||||
loop_cmd = $(echo-cmd) $(cmd_$(1))
|
loop_cmd = $(echo-cmd) $(cmd_$(1)) || exit;
|
||||||
|
|
||||||
# $2 sphinx builder e.g. "html"
|
# $2 sphinx builder e.g. "html"
|
||||||
# $3 name of the build subfolder / e.g. "media", used as:
|
# $3 name of the build subfolder / e.g. "media", used as:
|
||||||
|
@ -54,7 +54,7 @@ loop_cmd = $(echo-cmd) $(cmd_$(1))
|
||||||
# e.g. "media" for the linux-tv book-set at ./Documentation/media
|
# e.g. "media" for the linux-tv book-set at ./Documentation/media
|
||||||
|
|
||||||
quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
|
quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
|
||||||
cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media $2;\
|
cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media $2 && \
|
||||||
PYTHONDONTWRITEBYTECODE=1 \
|
PYTHONDONTWRITEBYTECODE=1 \
|
||||||
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
|
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
|
||||||
$(SPHINXBUILD) \
|
$(SPHINXBUILD) \
|
||||||
|
@ -64,13 +64,13 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
|
||||||
-D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \
|
-D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \
|
||||||
$(ALLSPHINXOPTS) \
|
$(ALLSPHINXOPTS) \
|
||||||
$(abspath $(srctree)/$(src)/$5) \
|
$(abspath $(srctree)/$(src)/$5) \
|
||||||
$(abspath $(BUILDDIR)/$3/$4);
|
$(abspath $(BUILDDIR)/$3/$4)
|
||||||
|
|
||||||
htmldocs:
|
htmldocs:
|
||||||
@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
|
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
|
||||||
|
|
||||||
latexdocs:
|
latexdocs:
|
||||||
@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))
|
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))
|
||||||
|
|
||||||
ifeq ($(HAVE_PDFLATEX),0)
|
ifeq ($(HAVE_PDFLATEX),0)
|
||||||
|
|
||||||
|
@ -81,15 +81,15 @@ pdfdocs:
|
||||||
else # HAVE_PDFLATEX
|
else # HAVE_PDFLATEX
|
||||||
|
|
||||||
pdfdocs: latexdocs
|
pdfdocs: latexdocs
|
||||||
$(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX=$(PDFLATEX) LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex;)
|
$(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX=$(PDFLATEX) LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex || exit;)
|
||||||
|
|
||||||
endif # HAVE_PDFLATEX
|
endif # HAVE_PDFLATEX
|
||||||
|
|
||||||
epubdocs:
|
epubdocs:
|
||||||
@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,epub,$(var),epub,$(var)))
|
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,epub,$(var),epub,$(var)))
|
||||||
|
|
||||||
xmldocs:
|
xmldocs:
|
||||||
@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,xml,$(var),xml,$(var)))
|
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,xml,$(var),xml,$(var)))
|
||||||
|
|
||||||
endif # HAVE_SPHINX
|
endif # HAVE_SPHINX
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ quiet_cmd_genpdf = GENPDF $2
|
||||||
cmd_genpdf = convert $2 $3
|
cmd_genpdf = convert $2 $3
|
||||||
|
|
||||||
quiet_cmd_gendot = DOT $2
|
quiet_cmd_gendot = DOT $2
|
||||||
cmd_gendot = dot -Tsvg $2 > $3
|
cmd_gendot = dot -Tsvg $2 > $3 || { rm -f $3; exit 1; }
|
||||||
|
|
||||||
%.pdf: %.svg
|
%.pdf: %.svg
|
||||||
@$(call cmd,genpdf,$<,$@)
|
@$(call cmd,genpdf,$<,$@)
|
||||||
|
|
Loading…
Reference in New Issue