+}
+
+
+void LaTeX::updateBibtexDependencies(DepTable & dep,
+ vector<Aux_Info> const & bibtex_info)
+{
+ // Since a run of Bibtex mandates more latex runs it is ok to
+ // remove all ".bib" and ".bst" files.
+ dep.remove_files_with_extension(".bib");
+ dep.remove_files_with_extension(".bst");
+ //string aux = OnlyFilename(ChangeExtension(file, ".aux"));
+
+ for (vector<Aux_Info>::const_iterator it = bibtex_info.begin();
+ it != bibtex_info.end(); ++it) {
+ for (set<string>::const_iterator it2 = it->databases.begin();
+ it2 != it->databases.end(); ++it2) {
+ string file = findtexfile(*it2, "bib");
+ if (!file.empty())
+ dep.insert(file, true);
+ }
+
+ for (set<string>::const_iterator it2 = it->styles.begin();
+ it2 != it->styles.end(); ++it2) {
+ string file = findtexfile(*it2, "bst");
+ if (!file.empty())
+ dep.insert(file, true);
+ }
+ }
+}
+
+
+bool LaTeX::runBibTeX(vector<Aux_Info> const & bibtex_info)
+{
+ bool result = false;
+ for (vector<Aux_Info>::const_iterator it = bibtex_info.begin();
+ it != bibtex_info.end(); ++it) {
+ if (it->databases.empty())
+ continue;
+ result = true;
+
+ string tmp = "bibtex ";
+ tmp += OnlyFilename(ChangeExtension(it->aux_file, string()));
+ Systemcall one;
+ one.startscript(Systemcall::Wait, tmp);