]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeX.C
fix some C++ parsing bugs
[lyx.git] / src / LaTeX.C
index 5995025dee4872a8781e4d96595bc33a798c0433..65f45b9458e0f9bba926dedea2ea739e2ba4a003 100644 (file)
@@ -79,7 +79,7 @@ void showRunMessage(LyXFunc * lf, unsigned int count)
        lf->dispatch(FuncRequest(LFUN_MESSAGE, STRCONV(str.str())));
 }
 
+
 };
 /*
  * CLASS TEXERRORS
@@ -180,7 +180,10 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
        if (had_depfile) {
                lyxerr[Debug::DEPEND] << "Dependency file exists" << endl;
                // Read the dep file:
-               head.read(depfile);
+               had_depfile = head.read(depfile);
+       }
+
+       if (had_depfile) {
                // Update the checksums
                head.update();
                // Can't just check if anything has changed because it might have aborted
@@ -201,7 +204,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
                        run_bibtex = true;
        } else
                lyxerr[Debug::DEPEND]
-                       << "Dependency file does not exist" << endl;
+                       << "Dependency file does not exist, or has wrong format" << endl;
 
        /// We scan the aux file even when had_depfile = false,
        /// because we can run pdflatex on the file after running latex on it,
@@ -213,7 +216,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
        ++count;
        lyxerr[Debug::LATEX] << "Run #" << count << endl;
        if (lfun) {
-               showRunMessage(lfun, count); 
+               showRunMessage(lfun, count);
        }
 
        this->operator()();