if(const ObjectFile *obj = dynamic_cast<const ObjectFile *>(&tgt))
return build_depend_table(obj->get_source(), depth);
}
- else if(mode==REBUILD && !tgt.get_rebuild() && !real->get_rebuild())
+ else if(mode==REBUILD && !tgt.needs_rebuild() && !real->needs_rebuild())
/* All targets that depend on to-be-built targets will be rebuilt
themselves, so we can stop here. */
return;
else
row.push_back("");
- if(tgt.get_rebuild())
+ if(tgt.needs_rebuild())
{
if(tgt.get_rebuild_reason().empty())
row.push_back("Yes (no reason)");
if(j->second->get_package()==i->second)
{
++count;
- if(j->second->get_rebuild())
+ if(j->second->needs_rebuild())
++to_be_built;
}
if(count)
unsigned total = 0;
for(map<string, Target *>::const_iterator i=targets.begin(); i!=targets.end(); ++i)
- if(i->second->is_buildable() && i->second->get_rebuild())
+ if(i->second->is_buildable() && i->second->needs_rebuild())
++total;
if(!total)
FileTarget *ft = dynamic_cast<FileTarget *>(*i);
if(ft && ft->get_mtime()>mtime)
mark_rebuild((*i)->get_name()+" has changed");
- else if((*i)->get_rebuild())
+ else if((*i)->needs_rebuild())
mark_rebuild((*i)->get_name()+" needs rebuilding");
else
{
Target *real = ft->get_real_target();
- if(real->get_rebuild())
+ if(real->needs_rebuild())
mark_rebuild(real->get_name()+" needs rebuilding");
}
}
mark_rebuild("Does not exist");
else if(source.get_mtime()>mtime || source.get_size()!=size)
mark_rebuild(source.get_name()+" has changed");
- else if(source.get_rebuild())
+ else if(source.needs_rebuild())
mark_rebuild(source.get_name()+" needs rebuilding");
}
Target *tgt = (*i)->get_buildable_target();
if(tgt)
return tgt;
- else if((*i)->get_rebuild())
+ else if((*i)->needs_rebuild())
self_ok = false;
}
const Tool *get_tool() const { return tool; }
bool is_buildable() const { return tool!=0; }
- bool get_rebuild() const { return rebuild; }
+ bool needs_rebuild() const { return rebuild; }
const std::string &get_rebuild_reason() const { return rebuild_reason; }
bool is_installable() const { return !install_location.empty(); }
const std::string &get_install_location() const { return install_location; }
{
// Virtual targets are only rebuilt if their dependencies need rebuilding.
for(Dependencies::iterator i=depends.begin(); (i!=depends.end() && !rebuild); ++i)
- if((*i)->get_rebuild())
+ if((*i)->needs_rebuild())
mark_rebuild((*i)->get_name()+" needs rebuilding");
}