- string aux = OnlyFilename(ChangeExtension(file, ".aux"));
- vector<string> const aux_files = scanAuxFiles(aux, dep, true);
- // Run bibtex on each of the aux files in
- for (vector<string>::const_iterator it = aux_files.begin();
- it != aux_files.end(); ++it) {
+ //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;
+