diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-08-18 10:53:39 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2016-08-22 17:26:17 -0400 |
commit | d565127d120e9b95ba98549c31eab9cec1cbbbc7 (patch) | |
tree | 679c0a498c3bbf46d6932748c539b88e021b1fa2 | |
parent | 9cd3476c91708b4b814f17671597a2708ec195ed (diff) |
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: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rw-r--r-- | Documentation/DocBook/Makefile | 1 | ||||
-rw-r--r-- | Documentation/Makefile.sphinx | 7 | ||||
-rw-r--r-- | Makefile | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index a91c96522379..a558dfcc9e2d 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -72,6 +72,7 @@ installmandocs: mandocs | |||
72 | 72 | ||
73 | # no-op for the DocBook toolchain | 73 | # no-op for the DocBook toolchain |
74 | epubdocs: | 74 | epubdocs: |
75 | latexdocs: | ||
75 | 76 | ||
76 | ### | 77 | ### |
77 | #External programs used | 78 | #External programs used |
diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx index ba4efb1f68f3..894cfaa41f55 100644 --- a/Documentation/Makefile.sphinx +++ b/Documentation/Makefile.sphinx | |||
@@ -66,12 +66,16 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4); | |||
66 | htmldocs: | 66 | htmldocs: |
67 | @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var))) | 67 | @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var))) |
68 | 68 | ||
69 | pdfdocs: | 69 | latexdocs: |
70 | ifeq ($(HAVE_PDFLATEX),0) | 70 | ifeq ($(HAVE_PDFLATEX),0) |
71 | $(warning The 'xelatex' command was not found. Make sure you have it installed and in PATH to produce PDF output.) | 71 | $(warning The 'xelatex' command was not found. Make sure you have it installed and in PATH to produce PDF output.) |
72 | @echo " SKIP Sphinx $@ target." | 72 | @echo " SKIP Sphinx $@ target." |
73 | else # HAVE_PDFLATEX | 73 | else # HAVE_PDFLATEX |
74 | @$(call loop_cmd,sphinx,latex,.,latex,.) | 74 | @$(call loop_cmd,sphinx,latex,.,latex,.) |
75 | endif # HAVE_PDFLATEX | ||
76 | |||
77 | pdfdocs: latexdocs | ||
78 | ifneq ($(HAVE_PDFLATEX),0) | ||
75 | $(Q)$(MAKE) PDFLATEX=xelatex LATEXOPTS="-interaction=nonstopmode" -C $(BUILDDIR)/latex | 79 | $(Q)$(MAKE) PDFLATEX=xelatex LATEXOPTS="-interaction=nonstopmode" -C $(BUILDDIR)/latex |
76 | endif # HAVE_PDFLATEX | 80 | endif # HAVE_PDFLATEX |
77 | 81 | ||
@@ -95,6 +99,7 @@ endif # HAVE_SPHINX | |||
95 | dochelp: | 99 | dochelp: |
96 | @echo ' Linux kernel internal documentation in different formats (Sphinx):' | 100 | @echo ' Linux kernel internal documentation in different formats (Sphinx):' |
97 | @echo ' htmldocs - HTML' | 101 | @echo ' htmldocs - HTML' |
102 | @echo ' latexdocs - LaTeX' | ||
98 | @echo ' pdfdocs - PDF' | 103 | @echo ' pdfdocs - PDF' |
99 | @echo ' epubdocs - EPUB' | 104 | @echo ' epubdocs - EPUB' |
100 | @echo ' xmldocs - XML' | 105 | @echo ' xmldocs - XML' |
@@ -1432,7 +1432,7 @@ $(help-board-dirs): help-%: | |||
1432 | 1432 | ||
1433 | # Documentation targets | 1433 | # Documentation targets |
1434 | # --------------------------------------------------------------------------- | 1434 | # --------------------------------------------------------------------------- |
1435 | DOC_TARGETS := xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs epubdocs cleandocs | 1435 | DOC_TARGETS := xmldocs sgmldocs psdocs latexdocs pdfdocs htmldocs mandocs installmandocs epubdocs cleandocs |
1436 | PHONY += $(DOC_TARGETS) | 1436 | PHONY += $(DOC_TARGETS) |
1437 | $(DOC_TARGETS): scripts_basic FORCE | 1437 | $(DOC_TARGETS): scripts_basic FORCE |
1438 | $(Q)$(MAKE) $(build)=scripts build_docproc build_check-lc_ctype | 1438 | $(Q)$(MAKE) $(build)=scripts build_docproc build_check-lc_ctype |