Documentation/sphinx: make it possible to build latexdocs without pdflatex
authorJani Nikula <jani.nikula@intel.com>
Wed, 2 Nov 2016 09:13:19 +0000 (11:13 +0200)
committerJani Nikula <jani.nikula@intel.com>
Thu, 3 Nov 2016 10:35:29 +0000 (12:35 +0200)
Building latexdocs doesn't actually require $(PDFLATEX). Move the checks
for it to the pdfdocs target which does require it, and specifically
outside of the target in order to not depend on latexdocs when we can't
build pdfdocs anyway.

Reviewed-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Tested-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Documentation/Makefile.sphinx

index 1314e3ee31c4e433ebd4c2d559e57b652ddd647d..4819638f7e216366407873410bd346eca50cc5fc 100644 (file)
@@ -69,15 +69,17 @@ htmldocs:
        @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
 
 latexdocs:
+       @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))
+
 ifeq ($(HAVE_PDFLATEX),0)
+
+pdfdocs:
        $(warning The '$(PDFLATEX)' command was not found. Make sure you have it installed and in PATH to produce PDF output.)
        @echo "  SKIP    Sphinx $@ target."
+
 else # HAVE_PDFLATEX
-       @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))
-endif # HAVE_PDFLATEX
 
 pdfdocs: latexdocs
-ifneq ($(HAVE_PDFLATEX),0)
        $(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX=$(PDFLATEX) LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex)
 
 endif # HAVE_PDFLATEX