diff --git a/src/ChangeLog b/src/ChangeLog index 30398d7b5c..4e40deedfa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-03-07 Dekel Tsur + + * LaTeX.C (run): Fix a bug where the DVI file was not updated due + to an old format .dep file. + 2003-03-07 Angus Leeming * BufferView_pimpl.C (dispatch): diff --git a/src/DepTable.C b/src/DepTable.C index efb487e669..a23c091660 100644 --- a/src/DepTable.C +++ b/src/DepTable.C @@ -234,7 +234,7 @@ void DepTable::write(string const & f) const } -void DepTable::read(string const & f) +bool DepTable::read(string const & f) { ifstream ifs(f.c_str()); string nome; @@ -252,4 +252,5 @@ void DepTable::read(string const & f) } deplist[nome] = di; } + return deplist.size(); } diff --git a/src/DepTable.h b/src/DepTable.h index 8198bec144..9efe5c7612 100644 --- a/src/DepTable.h +++ b/src/DepTable.h @@ -32,8 +32,8 @@ public: /// void write(string const & f) const; - /// - void read(string const & f); + /// returns true if dep file was read successfully + bool read(string const & f); /// returns true if any of the files has changed bool sumchange() const; /// return true if fil has changed. diff --git a/src/LaTeX.C b/src/LaTeX.C index 69f46d63f2..65f45b9458 100644 --- a/src/LaTeX.C +++ b/src/LaTeX.C @@ -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,