component = &c;
for(list<ObjectFile *>::const_iterator i=objects.begin(); i!=objects.end(); ++i)
add_dependency(**i);
+
+ nested_build_sig = true;
+ arch_in_build_sig = true;
}
void Binary::find_dependencies()
add_dependency(**i);
}
}
-
-string Binary::create_build_signature() const
-{
- set<const Tool *> object_tools;
- for(list<ObjectFile *>::const_iterator i=objects.begin(); i!=objects.end(); ++i)
- object_tools.insert((*i)->get_tool());
-
- list<string> sigs;
- for(set<const Tool *>::const_iterator i=object_tools.begin(); i!=object_tools.end(); ++i)
- sigs.push_back((*i)->create_build_signature(component->get_build_info()));
- sigs.sort();
- sigs.push_front(tool->create_build_signature(component->get_build_info()));
- if(const Architecture *arch = tool->get_architecture())
- sigs.push_front(arch->get_name());
-
- return join(sigs.begin(), sigs.end(), ";");
-}
Binary(Builder &, const Component &, const std::string &, const std::list<ObjectFile *> &);
virtual void find_dependencies();
-
- virtual std::string create_build_signature() const;
};
#endif
{
size = 0;
package = p;
+ nested_build_sig = false;
+ arch_in_build_sig = false;
builder.get_vfs().register_path(path, this);
return string();
const BuildInfo &binfo = (component ? component->get_build_info() : package->get_build_info());
- return tool->create_build_signature(binfo);
+ list<string> sigs;
+ if(nested_build_sig && component)
+ {
+ set<const Tool *> depend_tools;
+ for(Dependencies::const_iterator i=depends.begin(); i!=depends.end(); ++i)
+ if((*i)->get_component()==component && (*i)->get_tool())
+ depend_tools.insert((*i)->get_tool());
+
+ for(set<const Tool *>::const_iterator i=depend_tools.begin(); i!=depend_tools.end(); ++i)
+ sigs.push_back((*i)->create_build_signature(binfo));
+ sigs.sort();
+ sigs.push_front(tool->create_build_signature(binfo));
+ }
+ else
+ sigs.push_back(tool->create_build_signature(binfo));
+
+ if(arch_in_build_sig)
+ if(const Architecture *arch = tool->get_architecture())
+ sigs.push_front(arch->get_name());
+
+ return join(sigs.begin(), sigs.end(), ";");
}
void FileTarget::build(Task &task)
unsigned size;
Msp::FS::Path install_location;
std::string install_filename;
+ bool nested_build_sig;
+ bool arch_in_build_sig;
FileTarget(Builder &, const Msp::FS::Path &);
FileTarget(Builder &, const SourcePackage &, const Msp::FS::Path &);
add_dependency(**i);
install_location = "lib";
+ nested_build_sig = true;
+ arch_in_build_sig = true;
}
string StaticLibrary::generate_filename(const Component &comp)