- // At this point we must run external programs if needed.
- // makeindex will be run if a .idx file changed or was generated.
- // And if there were undefined citations or changes in references
- // the .aux file is checked for signs of bibtex. Bibtex is then run
- // if needed.
-
- // memoir (at least) writes an empty *idx file in the first place.
- // A second latex run is needed.
- FileName const idxfile(changeExtension(file.absFileName(), ".idx"));
- rerun = idxfile.exists() && idxfile.isFileEmpty();
-
- // run makeindex
- if (head.haschanged(idxfile)) {
- // no checks for now
- LYXERR(Debug::LATEX, "Running MakeIndex.");
- message(_("Running Index Processor."));
- // onlyFileName() is needed for cygwin
- int const ret =
- runMakeIndex(onlyFileName(idxfile.absFileName()), runparams);
- if (ret == Systemcall::KILLED)
- return Systemcall::KILLED;
- rerun = true;
- }
-
- FileName const nlofile(changeExtension(file.absFileName(), ".nlo"));
- // If all nomencl entries are removed, nomencl writes an empty nlo file.
- // DepTable::hasChanged() returns false in this case, since it does not
- // distinguish empty files from non-existing files. This is why we need
- // the extra checks here (to trigger a rerun). Cf. discussions in #8905.
- // FIXME: Sort out the real problem in DepTable.
- if (head.haschanged(nlofile) || (nlofile.exists() && nlofile.isFileEmpty())) {
- int const ret = runMakeIndexNomencl(file, ".nlo", ".nls");
- if (ret == Systemcall::KILLED)
- return Systemcall::KILLED;
- rerun = true;
- }
-
- FileName const glofile(changeExtension(file.absFileName(), ".glo"));
- if (head.haschanged(glofile)) {
- int const ret = runMakeIndexNomencl(file, ".glo", ".gls");
- if (ret)
- return ret;
- rerun = true;
- }
-
-
- // check if we're using biber instead of bibtex