+void Target::set_tool(Tool &t)
+{
+ tool = &t;
+ for(Target *s: side_effects)
+ s->set_tool(t);
+}
+
+void Target::collect_build_info(BuildInfo &binfo) const
+{
+ if(tool)
+ binfo.update_from(tool->get_build_info());
+ if(component)
+ binfo.update_from(component->get_build_info());
+ else if(package)
+ binfo.update_from(package->get_build_info());
+}
+
+void Target::force_rebuild()
+{
+ if(!is_buildable())
+ throw logic_error("Target::force_rebuild");
+ mark_rebuild("Forced rebuild");
+}
+
+void Target::mark_rebuild(const string &reason)