Commit d565127d authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Jonathan Corbet

docs-rst: add support for LaTeX output

Sphinx supports LaTeX output. Sometimes, it is interesting to
call it directly, instead of also generating a PDF. As it comes
for free, add a target for it.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 9cd3476c
...@@ -72,6 +72,7 @@ installmandocs: mandocs ...@@ -72,6 +72,7 @@ installmandocs: mandocs
# no-op for the DocBook toolchain # no-op for the DocBook toolchain
epubdocs: epubdocs:
latexdocs:
### ###
#External programs used #External programs used
......
...@@ -66,12 +66,16 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4); ...@@ -66,12 +66,16 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(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)))
pdfdocs: latexdocs:
ifeq ($(HAVE_PDFLATEX),0) ifeq ($(HAVE_PDFLATEX),0)
$(warning The 'xelatex' command was not found. Make sure you have it installed and in PATH to produce PDF output.) $(warning The 'xelatex' command was not found. Make sure you have it installed and in PATH to produce PDF output.)
@echo " SKIP Sphinx $@ target." @echo " SKIP Sphinx $@ target."
else # HAVE_PDFLATEX else # HAVE_PDFLATEX
@$(call loop_cmd,sphinx,latex,.,latex,.) @$(call loop_cmd,sphinx,latex,.,latex,.)
endif # HAVE_PDFLATEX
pdfdocs: latexdocs
ifneq ($(HAVE_PDFLATEX),0)
$(Q)$(MAKE) PDFLATEX=xelatex LATEXOPTS="-interaction=nonstopmode" -C $(BUILDDIR)/latex $(Q)$(MAKE) PDFLATEX=xelatex LATEXOPTS="-interaction=nonstopmode" -C $(BUILDDIR)/latex
endif # HAVE_PDFLATEX endif # HAVE_PDFLATEX
...@@ -95,6 +99,7 @@ endif # HAVE_SPHINX ...@@ -95,6 +99,7 @@ endif # HAVE_SPHINX
dochelp: dochelp:
@echo ' Linux kernel internal documentation in different formats (Sphinx):' @echo ' Linux kernel internal documentation in different formats (Sphinx):'
@echo ' htmldocs - HTML' @echo ' htmldocs - HTML'
@echo ' latexdocs - LaTeX'
@echo ' pdfdocs - PDF' @echo ' pdfdocs - PDF'
@echo ' epubdocs - EPUB' @echo ' epubdocs - EPUB'
@echo ' xmldocs - XML' @echo ' xmldocs - XML'
......
...@@ -1432,7 +1432,7 @@ $(help-board-dirs): help-%: ...@@ -1432,7 +1432,7 @@ $(help-board-dirs): help-%:
# Documentation targets # Documentation targets
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
DOC_TARGETS := xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs epubdocs cleandocs DOC_TARGETS := xmldocs sgmldocs psdocs latexdocs pdfdocs htmldocs mandocs installmandocs epubdocs cleandocs
PHONY += $(DOC_TARGETS) PHONY += $(DOC_TARGETS)
$(DOC_TARGETS): scripts_basic FORCE $(DOC_TARGETS): scripts_basic FORCE
$(Q)$(MAKE) $(build)=scripts build_docproc build_check-lc_ctype $(Q)$(MAKE) $(build)=scripts build_docproc build_check-lc_ctype
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment