]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
docs-rst: add support for LaTeX output
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 18 Aug 2016 14:53:39 +0000 (11:53 -0300)
committerJonathan Corbet <corbet@lwn.net>
Mon, 22 Aug 2016 21:26:17 +0000 (15:26 -0600)
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: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/DocBook/Makefile
Documentation/Makefile.sphinx
Makefile

index a91c96522379534344ca37cc710855489b70befc..a558dfcc9e2d1521d9fe53fc9a85551bdc62d894 100644 (file)
@@ -72,6 +72,7 @@ installmandocs: mandocs
 
 # no-op for the DocBook toolchain
 epubdocs:
+latexdocs:
 
 ###
 #External programs used
index ba4efb1f68f30c3236b38a7894b3555e4a28bbdd..894cfaa41f55b1c3e7d67faad054fff537de719c 100644 (file)
@@ -66,12 +66,16 @@ quiet_cmd_sphinx = SPHINX  $@ --> file://$(abspath $(BUILDDIR)/$3/$4);
 htmldocs:
        @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
 
-pdfdocs:
+latexdocs:
 ifeq ($(HAVE_PDFLATEX),0)
        $(warning The 'xelatex' command was not found. Make sure you have it installed and in PATH to produce PDF output.)
        @echo "  SKIP    Sphinx $@ target."
 else # HAVE_PDFLATEX
        @$(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
 endif # HAVE_PDFLATEX
 
@@ -95,6 +99,7 @@ endif # HAVE_SPHINX
 dochelp:
        @echo  ' Linux kernel internal documentation in different formats (Sphinx):'
        @echo  '  htmldocs        - HTML'
+       @echo  '  latexdocs       - LaTeX'
        @echo  '  pdfdocs         - PDF'
        @echo  '  epubdocs        - EPUB'
        @echo  '  xmldocs         - XML'
index 70de1448c5717b6914bc6626fe1663e4d52c1e95..0fa3feb6f74ea64d9caaba265c8f884f2f64976b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1432,7 +1432,7 @@ $(help-board-dirs): help-%:
 
 # 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)
 $(DOC_TARGETS): scripts_basic FORCE
        $(Q)$(MAKE) $(build)=scripts build_docproc build_check-lc_ctype