}
-void BuildInfo::add(const BuildInfo &bi)
+void BuildInfo::update_from(const BuildInfo &bi)
{
cflags.insert(cflags.end(), bi.cflags.begin(), bi.cflags.end());
defines.insert(defines.end(), bi.defines.begin(), bi.defines.end());
StringList warnings;
/** Adds another BuildInfo to the end of this one. */
- void add(const BuildInfo &);
+ void update_from(const BuildInfo &);
/** Makes sure there are no duplicate entries in the lists. For warnings,
contradicting flags are eliminated and the last one stays in effect. */
for(PackageList::iterator i=all_reqs.begin(); i!=all_reqs.end(); ++i)
{
if(find(direct_reqs.begin(), direct_reqs.end(), *i)!=direct_reqs.end())
- build_info.add((*i)->get_exported_binfo());
+ build_info.update_from((*i)->get_exported_binfo());
else
{
const BuildInfo &ebi = (*i)->get_exported_binfo();
all_reqs.push_back(*j);
}
- build_info.add(pkg.get_build_info());
+ build_info.update_from(pkg.get_build_info());
for(StringList::iterator i=build_info.incpath.begin(); i!=build_info.incpath.end(); ++i)
*i = (pkg.get_source() / *i).str();
void SourcePackage::create_build_info()
{
- build_info.add(builder.get_current_arch().get_build_info());
+ build_info.update_from(builder.get_current_arch().get_build_info());
// XXX Currently, a package-specific settings will override cmdline. This might or might not be desirable.
const StringList &warnings = builder.get_warnings();
for(ConditionList::iterator i=conditions.begin(); i!=conditions.end(); ++i)
if(i->eval())
- build_info.add(i->get_build_info());
+ build_info.update_from(i->get_build_info());
build_info.unique();