Re: [PATCH v3 6/6] [media] docs-rst: auto-generate PDF image files

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

 



Em Wed, 16 Nov 2016 15:32:52 -0700
Jonathan Corbet <corbet@xxxxxxx> escreveu:

> On Mon, 14 Nov 2016 14:32:32 -0200
> Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx> wrote:
> 
> One nit...
> 
> > diff --git a/Documentation/media/Makefile b/Documentation/media/Makefile
> > index a7fb35291f6c..297b85c37ab9 100644
> > --- a/Documentation/media/Makefile
> > +++ b/Documentation/media/Makefile  
> 
> [...]
> 
> > +clean:
> > +	-rm $(IMGTGT) 2>/dev/null  
> 
> This puts out a failure message if those files aren't actually present.
> I'll tack on a patch adding "-f" there.

Sounds good to me.

> I can now build PDF files again!  That is a good thing.

Great!

> I do notice that it's kind of hard to *find* the PDF files among all the
> other cruft that the build process leaves there.  Assuming we actually
> want to keep that stuff around, maybe we could move the resulting PDF
> files into a separate "pdf" directory?

Agreed. Markus once mentioned that we could provide a Makefile for the
LaTeX handling, instead of letting Sphinx create its own, using something
like this, at the conf.py[1]. 

[1] https://lkml.org/lkml/2016/8/10/114

>From his e-mail:
	"A good starting point might be to ship our own tex-Makefile:
	 create a folder e.g. Documentation/sphinx-tex place your
	 Makefile (a copy of Sphinx's Makefile) in. In conf.py set
	 the 

	  latex_additional_files = [
	      "sphinx-text/Makefile"
	  ]

	In the sphinx-tex/Makefile set e.g.

	  # Additional LaTeX options
	  LATEXOPTS = -interaction=batchmode
	  LATEX_ENV = max_print_line=120

	  LATEX = $(LATEX_ENV) latex
	  PDFLATEX = $(LATEX_ENV) pdflatex
	  MAKEINDEX = $(LATEX_ENV) makeindex"

Perhaps we could do that, changing the %.pdf: %.tex target
to store the PDF files on a separate dir.

Btw, it also makes sense to do the same for html output, as Sphinx
build also keep some things that seem to be internal files together
with the html output, like:
	Documentation/output/.buildinfo
	Documentation/output/objects.inv
	Documentation/output/.doctrees/

> 
> We're also not yet building all of the sub-books into PDF, will look into
> that.

You need to add a target for each book at the conf.py, and one conf.py
per sub-book, if you want to allow building them individually with
SPHINXDIRS. I'm wandering if is there a way to do it automatically.

> 
> Anyway, this series is applied, thanks!

Thanks!
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