if(!(*i)->get_install())
{
build_info.libmodes[(*i)->get_name()] = BuildInfo::STATIC;
- build_info.libpath.push_back((*i)->get_package().get_source_directory());
+ build_info.libpath.push_back((*i)->get_package().get_output_directory());
}
}
list<Target *> objs;
SourceList source_filenames = collect_source_files();
- for(SourceList::const_iterator i=source_filenames.begin(); i!=source_filenames.end(); ++i)
+ for(SourceList::iterator i=source_filenames.begin(); i!=source_filenames.end(); ++i)
{
string ext = FS::extpart(FS::basename(*i));
Target *src = 0;
Tool *gen = pkg_tools.get_tool_for_suffix(ext);
if(gen)
{
- Target *tmpl = gen->create_source(*this, *i);
- if(tmpl)
+ list<Target *> templates;
+ templates.push_back(gen->create_source(*this, *i));
+
+ Tool::ProcessingUnit processing_unit = gen->get_processing_unit();
+ if(processing_unit!=Tool::ONE_FILE)
{
- src = gen->create_target(*tmpl);
- ext = FS::extpart(FS::basename(dynamic_cast<FileTarget &>(*src).get_path()));
+ FS::Path source_dir = FS::dirname(*i);
+ SourceList::iterator j = i;
+ for(++j; j!=source_filenames.end(); )
+ {
+ if((processing_unit!=Tool::DIRECTORY || FS::dirname(*j)==source_dir) &&
+ pkg_tools.get_tool_for_suffix(FS::extpart(FS::basename(*j)))==gen)
+ {
+ templates.push_back(gen->create_source(*this, *j));
+ // Remove additional files so they won't get processed again
+ source_filenames.erase(j++);
+ }
+ else
+ ++j;
+ }
}
+
+ src = gen->create_target(templates);
+ ext = FS::extpart(FS::basename(dynamic_cast<FileTarget &>(*src).get_path()));
}
Tool *tool = toolchain.get_tool_for_suffix(ext, true);
}
BinaryComponent::Loader::Loader(BinaryComponent &c):
- DerivedObjectLoader<BinaryComponent, Component::Loader>(c)
+ DataFile::DerivedObjectLoader<BinaryComponent, Component::Loader>(c)
{
add("use", &Loader::use);
}