- for(BuildInfo::PathList::iterator i=build_info.incpath.begin(); i!=build_info.incpath.end(); ++i)
- *i = (package.get_source_directory() / *i).str();
- for(BuildInfo::PathList::iterator i=build_info.libpath.begin(); i!=build_info.libpath.end(); ++i)
- *i = (package.get_source_directory() / *i).str();
-
- for(UseList::const_iterator i=uses.begin(); i!=uses.end(); ++i)
- {
- /* Select an include path that contains all the sources for this and the
- used component. This should produce a sensible result in most cases. */
- FS::Path base;
- for(SourceList::const_iterator j=sources.begin(); j!=sources.end(); ++j)
- base = base.empty() ? *j : FS::common_ancestor(base, *j);
- const SourceList &use_sources = (*i)->get_sources();
- for(SourceList::const_iterator j=use_sources.begin(); j!=use_sources.end(); ++j)
- base = FS::common_ancestor(base, *j);
- build_info.incpath.push_back(base);
- build_info.libs.push_back((*i)->get_name());
- if(!(*i)->get_install())
- {
- build_info.libmodes[(*i)->get_name()] = BuildInfo::STATIC;
- build_info.libpath.push_back((*i)->get_package().get_source_directory());
- }
- }
-
- if(type==LIBRARY || type==MODULE)
- if(build_info.libmode<BuildInfo::DYNAMIC)
- build_info.libmode = BuildInfo::DYNAMIC;
-
- if(build_info.libmode<BuildInfo::DYNAMIC)
- {
- for(Package::Requirements::iterator i=all_reqs.begin(); i!=all_reqs.end(); ++i)
- {
- const BuildInfo &ebi = (*i)->get_exported_build_info();
- build_info.libpath.insert(build_info.libpath.end(), ebi.libpath.begin(), ebi.libpath.end());
- }
- }
+ for(FS::Path &p: build_info.incpath)
+ p = (package.get_source_directory()/p).str();
+ for(FS::Path &p: build_info.libpath)
+ p = (package.get_source_directory()/p).str();