- list<Target *> results;
- if(type==LIBRARY)
- {
- const Tool &archiver = toolchain.get_tool("AR");
- results.push_back(linker.create_target(objs, "shared"));
- results.push_back(archiver.create_target(objs));
- }
- else if(type==MODULE)
- results.push_back(linker.create_target(objs, "shared"));
- else
- results.push_back(linker.create_target(objs));
-
- const Target::Dependencies &world_deps = builder.get_target("world")->get_dependencies();
- for(UseList::const_iterator i=uses.begin(); i!=uses.end(); ++i)
- {
- /* The world target depends on all primary targets; look for the
- static library belonging to the component. This is a bit roundabout
- way but gets the job done. */
- bool found = false;
- for(Target::Dependencies::const_iterator j=world_deps.begin(); j!=world_deps.end(); ++j)
- if((*j)->get_component()==*i && dynamic_cast<StaticLibrary *>(*j))
- {
- results.front()->add_dependency(**j);
- found = true;
- break;
- }
- if(!found)
- builder.problem(package.get_name(), format("Can't find static library %s for component %s", (*i)->get_name(), name));
- }
-
- for(list<Target *>::const_iterator i=results.begin(); i!=results.end(); ++i)
- {
- builder.add_primary_target(**i);
- if(install)
- inst_list.push_back(*i);
- }
- }
-
- Target *inst_tgt = builder.get_target("install");
- const Tool © = toolchain.get_tool("CP");
- for(list<Target *>::const_iterator i=inst_list.begin(); i!=inst_list.end(); ++i)
- {
- Target *inst = copy.create_target(**i, inst_loc);
- inst_tgt->add_dependency(*inst);
+ for(SourceList::const_iterator i=sources.begin(); i!=sources.end(); ++i)
+ if(dir==*i)
+ {
+ binfo.local_incpath.push_back(dir);
+ for(OverlayList::const_iterator j=overlays.begin(); j!=overlays.end(); ++j)
+ binfo.local_incpath.push_back(*i/ *j);
+ }