From: heister Date: Tue, 17 Jan 2012 14:42:30 +0000 (+0000) Subject: fix make_dependencies for .inst files X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be0037833fded90cf4de7953d466e93a2085eb67;p=dealii-svn.git fix make_dependencies for .inst files git-svn-id: https://svn.dealii.org/trunk@24905 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/common/scripts/make_dependencies.cc b/deal.II/common/scripts/make_dependencies.cc index e17b8a9d9a..7f105ea77b 100644 --- a/deal.II/common/scripts/make_dependencies.cc +++ b/deal.II/common/scripts/make_dependencies.cc @@ -184,11 +184,25 @@ void determine_direct_includes (const std::string &file) std::abort(); } - // next try to locate the file in + + bool is_inst_file = + included_file.size()>5 + && (included_file.rfind(".inst") == (included_file.size()-5)); + + // .inst files are always relative to + // the current path. We need a special + // case, because they might not exist + // at this point and the next block + // checks the files for existence. + if (is_inst_file) + included_file = present_path+included_file; + + + // next try to locate the file in // absolute paths. For includes of the // form #include "...", we check the - // current path first. - if (included_file[0] != '/') + // current path first. + if (included_file[0] != '/' && !is_inst_file) { bool is_relative_path = false; if (line[pos] == '"' && file_exists(present_path+included_file)) @@ -219,8 +233,6 @@ void determine_direct_includes (const std::string &file) // it will be generated by make // later, so we better keep it // on the list. - bool is_inst_file = - included_file.size()>5 && (included_file.rfind(".inst") == (included_file.size()-5)); if (line[pos] != '"' || !is_inst_file) {