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))
// 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)
{