install_location = FS::Path("include")/package->get_name();
}
+void CSourceFile::parse_includes(IO::Base &in)
+{
+ static Regex r_include("^[ \t]*#include[ \t]+([\"<].*)[\">]");
+
+ string line;
+ while(in.getline(line))
+ if(RegMatch match = r_include.match(line))
+ includes.push_back(match[1].str);
+}
+
void CSourceFile::find_dependencies()
{
if(!component || !mtime)
builder.get_logger().log("files", format("Reading includes from %s", path.str()));
- Regex r_include("^[ \t]*#include[ \t]+([\"<].*)[\">]");
-
- string line;
- while(in.getline(line))
- if(RegMatch match = r_include.match(line))
- includes.push_back(match[1].str);
-
+ parse_includes(in);
cache.set_values(this, "includes", includes);
}