diff --git a/src/Dependency.cpp b/src/Dependency.cpp index b49d405..49d185e 100644 --- a/src/Dependency.cpp +++ b/src/Dependency.cpp @@ -107,23 +107,19 @@ Dependency::Dependency(std::string path) char original_file_buffer[PATH_MAX]; std::string original_file; - if (isRpath(path)) - { + if (isRpath(path)) { original_file = searchFilenameInRpaths(path); } - else if (not realpath(rtrim(path).c_str(), original_file_buffer)) - { + else if (not realpath(rtrim(path).c_str(), original_file_buffer)) { std::cerr << "\n/!\\ WARNING : Cannot resolve path '" << path.c_str() << "'" << std::endl; original_file = path; } - else - { + else { original_file = original_file_buffer; } // check if given path is a symlink - if (original_file != rtrim(path)) - { + if (original_file != rtrim(path)) { filename = stripPrefix(original_file); prefix = original_file.substr(0, original_file.rfind("/")+1); addSymlink(path); @@ -235,18 +231,16 @@ void Dependency::fixFileThatDependsOnMe(std::string file_to_fix) // for symlinks const int symamount = symlinks.size(); - parallel_for(symamount, [&](int start, int end) + for(int n=0; n& lines) if(output.find("can't open file")!=std::string::npos or output.find("No such file")!=std::string::npos or output.size()<1) { - std::cerr << output << std::endl; std::cerr << "Cannot find file " << filename << " to read its dependencies" << std::endl; exit(1); } @@ -225,6 +218,7 @@ void collectDependencies(std::string filename) const int line_amount = lines.size(); int start = 0; int end = line_amount; + std::cout << "collectDeps: # of lines: " << line_amount << std::endl; // parallel_for(line_amount, [&](int start, int end) // { for(int i=start; i