if (stat(itr->first.c_str(), &f_info) == 0) {
if (di.mtime_cur == f_info.st_mtime) {
di.crc_prev = di.crc_cur;
- lyxerr[Debug::DEPEND] << itr->first << " same mtime";
+ lyxerr[Debug::DEPEND] << itr->first << " same mtime" << endl;
} else {
di.crc_prev = di.crc_cur;
- lyxerr[Debug::DEPEND] << itr->first << " CRC... ";
+ lyxerr[Debug::DEPEND] << itr->first << " CRC... " << flush;
di.crc_cur = sum(itr->first);
- lyxerr[Debug::DEPEND] << "done";
+ lyxerr[Debug::DEPEND] << "done" << endl;
}
} else {
// file doesn't exist
void handleFoundFile(string const & ff, DepTable & head)
{
- static regex unwanted("^.*\\.(aux|log|dvi|bbl|ind|glo)$");
-
// convert from native os path to unix path
string const foundfile = os::internal_path(trim(ff));
- string const onlyfile = OnlyFilename(foundfile);
lyxerr[Debug::DEPEND] << "Found file: " << foundfile << endl;
// the latex run.
if (FileInfo(foundfile).exist())
head.insert(foundfile, true);
+
+ return;
}
+ string const onlyfile = OnlyFilename(foundfile);
+
// (2) foundfile is in the tmpdir
// insert it into head
- else if (FileInfo(onlyfile).exist()) {
- if (regex_match(foundfile, unwanted)) {
+ if (FileInfo(onlyfile).exist()) {
+ static regex unwanted("^.*\\.(aux|log|dvi|bbl|ind|glo)$");
+ if (regex_match(onlyfile, unwanted)) {
lyxerr[Debug::DEPEND]
<< "We don't want "
<< onlyfile
<< " in the dep file"
<< endl;
- } else if (suffixIs(foundfile, ".tex")) {
+ } else if (suffixIs(onlyfile, ".tex")) {
// This is a tex file generated by LyX
// and latex is not likely to change this
// during its runs.
<< "Tmpdir TeX file: "
<< onlyfile
<< endl;
- head.insert(foundfile, true);
+ head.insert(onlyfile, true);
} else {
lyxerr[Debug::DEPEND]
<< "In tmpdir file:"
string token;
getline(ifs, token);
token = rtrim(token, "\r");
- if (token.empty()) continue;
+ if (token.empty())
+ continue;
smatch sub;