Perform more sophisticated checks before initiating bibtool and latex rerun
Review Request #106617 - Created Sept. 27, 2012 and submitted
Kile rerun bibtool every time the user changes some .tex file. This is not a problem on itself, but then it reruns latex. And latex run might take a long time. The patch tries to eliminate bibtool (and thus latex) runs under some conditions. It suppose that we run bibtool only in the following cases: 1. Biblatex said that we have to (in this case bibToolInLaTexOutput is not empty) 2. At least one of the .bib has modification date younger then .bbl file 3. We have undefined citations and any of source files (including .bib and .tex) is younger then .bbl. If .bbl file is younger then all of them, then next generation will not change anything To achive that, it adds check for "undefined citation" latex message and changes LaTeX::updateBibs() in a way that allows to check only bib ddependencies or all dependencies. Also, it filters biblatex rerun messages when citation is missing in the database: there is no need to just rerun latex, it will not change anything. Before Kile was launching latex 3 times in a row without any effect.
It works incrorrectly with bibtex. In that case \bibliography command accept extension-less file names, and they goes in bibliography list in LaTeXParser::parse() (but with extension into dependencies). Thus, in LaTeX::updateBibs() dependencies list does not contain extensions and time check fails. A trivial change in LaTeXParser::parse() (first add extension, then add bibliography) fixes the problem but I can not predict will it break something else :) So, I'm not posting a separate patch