Re: [PATCH 1/3] Documentation/sphinx: let the user specify PDFLATEX and LATEXOPTS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jani,

Em Wed,  2 Nov 2016 11:40:11 +0200
Jani Nikula <jani.nikula@xxxxxxxxx> escreveu:

> Refer to xelatex and latex options via variables. This allows the user
> to override the pdflatex and latex options to use on the make command
> line for experimenting. As a side effect, this makes the makefile a bit
> tidier.

For all the patches in this series:

Reviewed-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>

I was actually thinking on doing something close to what you've done :-)

> 
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
> ---
>  Documentation/Makefile.sphinx | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
> index 92deea30b183..1314e3ee31c4 100644
> --- a/Documentation/Makefile.sphinx
> +++ b/Documentation/Makefile.sphinx
> @@ -10,6 +10,8 @@ _SPHINXDIRS   = $(patsubst $(srctree)/Documentation/%/conf.py,%,$(wildcard $(src
>  SPHINX_CONF   = conf.py
>  PAPER         =
>  BUILDDIR      = $(obj)/output
> +PDFLATEX      = xelatex
> +LATEXOPTS     = -interaction=nonstopmode
>  
>  # User-friendly check for sphinx-build
>  HAVE_SPHINX := $(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi)
> @@ -29,7 +31,7 @@ else ifneq ($(DOCBOOKS),)
>  else # HAVE_SPHINX
>  
>  # User-friendly check for pdflatex
> -HAVE_PDFLATEX := $(shell if which xelatex >/dev/null 2>&1; then echo 1; else echo 0; fi)
> +HAVE_PDFLATEX := $(shell if which $(PDFLATEX) >/dev/null 2>&1; then echo 1; else echo 0; fi)
>  
>  # Internal variables.
>  PAPEROPT_a4     = -D latex_paper_size=a4
> @@ -68,7 +70,7 @@ htmldocs:
>  
>  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.)
> +	$(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)))
> @@ -76,7 +78,8 @@ endif # HAVE_PDFLATEX
>  
>  pdfdocs: latexdocs
>  ifneq ($(HAVE_PDFLATEX),0)
> -	$(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX=xelatex LATEXOPTS="-interaction=nonstopmode" -C $(BUILDDIR)/$(var)/latex)
> +	$(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX=$(PDFLATEX) LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex)
> +
>  endif # HAVE_PDFLATEX
>  
>  epubdocs:




Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux