summaryrefslogtreecommitdiff
path: root/Documentation/Makefile
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-04-14 19:48:53 +0300
committerJonathan Corbet <corbet@lwn.net>2020-04-21 00:45:41 +0300
commitbaeb2d5cb8ea84dfb932cbde0e2adcd527e51bb5 (patch)
treee2e8fbcd038fdfcbc88e873572f5822a8ce1d4eb /Documentation/Makefile
parent36536a02e5542ea4909eea27fa7b173e81565312 (diff)
downloadlinux-baeb2d5cb8ea84dfb932cbde0e2adcd527e51bb5.tar.xz
docs: Makefile: place final pdf docs on a separate dir
The Sphinx build system for PDF is too complex and generate lots of ancillary files, including one PDF file for each image. So, at the end, the main latex dir has 156 pdf files, instead of the 71 ones that would match each generated book. That's confusing and it makes harder to identify when something didn't work. So, instead, let's move the final PDF output(s) to a separate dir. This way, the latex/ dir will have the temporary and the final *.tex files, while the final pdf files that built ok will be under the pdf/ directory. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/832752cbc9678a6e8d3d634bc3356d655d44684f.1586881715.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/Makefile')
-rw-r--r--Documentation/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index cc786d11a028..db1fc35ded50 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -98,7 +98,11 @@ else # HAVE_PDFLATEX
pdfdocs: latexdocs
@$(srctree)/scripts/sphinx-pre-install --version-check
- $(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX="$(PDFLATEX)" LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex || exit;)
+ $(foreach var,$(SPHINXDIRS), \
+ $(MAKE) PDFLATEX="$(PDFLATEX)" LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex || exit; \
+ mkdir -p $(BUILDDIR)/$(var)/pdf; \
+ mv $(subst .tex,.pdf,$(wildcard $(BUILDDIR)/$(var)/latex/*.tex)) $(BUILDDIR)/$(var)/pdf/; \
+ )
endif # HAVE_PDFLATEX