Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make latexpdf after make latex rebuilds latex sources #4362

Closed
jfbu opened this issue Dec 30, 2017 · 2 comments
Closed

make latexpdf after make latex rebuilds latex sources #4362

jfbu opened this issue Dec 30, 2017 · 2 comments

Comments

@jfbu
Copy link
Contributor

jfbu commented Dec 30, 2017

Procedure to reproduce the problem

With any project, make latexpdf will unneedlessly rebuild the latex source files even immediately afer make latex.

This is noticeable on big enough projects such as Sphinx own docs.

Expected results

make latexpdf should behave like make -C <builddir> all-pdf when there is no need to rebuild the latex files.

Environment info

  • OS: Mac
  • Python version: 3.6.4
  • Sphinx version: 1.6.5

May be relevant to #4343

edit

This actually applies to make latex itself: if executed twice in a row with no intervening changes, it still re-creates the tex file (which takes time on big projects).

@jfbu jfbu added this to the 1.7 milestone Dec 30, 2017
@jfbu jfbu added the type:bug label Dec 30, 2017
@jfbu jfbu modified the milestones: 1.7, 1.8 Dec 30, 2017
@jfbu
Copy link
Contributor Author

jfbu commented Mar 30, 2018

For example when building Sphinx documentation at my locale, I currently get typically:

The LaTeX files are in _build/latex.
Run 'make' in that directory to run these through (pdf)latex
(use `make latexpdf' here to do that automatically).

real	0m45.885s
user	0m45.703s
sys	0m0.172s

And if I now do

$ time make -C _build/latex all-pdf

this gives

real	0m9.943s
user	0m9.660s
sys	0m0.258s

This is why it is frustrating that make latexpdf immediately following make latex redoes all the Sphinx phase which amounts for most of the build time.

tk0miya added a commit to tk0miya/sphinx that referenced this issue Jun 13, 2018
tk0miya added a commit that referenced this issue Jun 17, 2018
Fix #4362: latex: Don't overwrite .tex file if document not changed
@tk0miya
Copy link
Member

tk0miya commented Jun 17, 2018

Fixed by #5085.
Please let me know if it does not work well.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants