return source_dir/arch.get_name();
}
-void SourcePackage::create_build_info()
+void SourcePackage::do_prepare()
{
BuildInfo final_build_info;
export_binfo.incpath.push_back((builder.get_prefix()/"include").str());
export_binfo.libpath.push_back((builder.get_prefix()/"lib").str());
}
-}
-void SourcePackage::create_targets()
-{
cache.load();
bool pc_needed = false;
add("build_info", &Loader::build_info);
add("feature", &Loader::feature);
add("if", &Loader::condition);
- add("if_arch", &Loader::if_arch);
add("if_feat", &Loader::if_feature);
add("program", &Loader::component<Component::PROGRAM>);
add("library", &Loader::component<Component::LIBRARY>);
install_map[*i] = "include/"+comp.get_name();
}
-void SourcePackage::Loader::if_arch(const string &cond)
-{
- const Architecture &arch = obj.builder.get_current_arch();
- bool negate = (cond[0]=='!');
- bool match = (arch.match_name(cond.substr(negate))!=negate);
- obj.builder.get_logger().log("configure", format("%s: arch %s %smatched", obj.name, cond, (match ? "" : "not ")));
- if(match)
- load_sub_with(*this);
-}
-
void SourcePackage::Loader::if_feature(const string &cond)
{
bool match = false;