FileTarget(b, &c.get_package(), generate_target_path(c)),
comp(c)
{
- buildable = true;
for(list<ObjectFile *>::const_iterator i=objs.begin(); i!=objs.end(); ++i)
add_depend(*i);
component(c),
source(s)
{
- buildable = true;
add_depend(&source);
install_location = "share/"+package->get_name();
void FileTarget::check_rebuild()
{
- if(!buildable)
+ if(!tool)
return;
if(builder.get_build_all())
FileTarget(b, &p, generate_target_path(b.get_prefix(), s, loc)),
source(s)
{
- buildable = true;
add_depend(&source);
if(const SharedLibrary *shlib = dynamic_cast<const SharedLibrary *>(&source))
comp(c),
source(s)
{
- buildable = true;
add_depend(&source);
}
PkgConfig::PkgConfig(Builder &b, const SourcePackage &p):
FileTarget(b, &p, p.get_source()/(p.get_name()+".pc"))
{
- buildable = true;
tool = &builder.get_toolchain().get_tool("PCG");
install_location = "lib/pkgconfig";
Library(b, package, path, c.get_name()),
comp(c)
{
- buildable = true;
for(list<ObjectFile *>::const_iterator i=objs.begin(); i!=objs.end(); ++i)
add_depend(*i);
TarBall::TarBall(Builder &b, const SourcePackage &p, const string &n):
FileTarget(b, &p, p.get_source()/(n+".tar"))
-{
- buildable = true;
-}
+{ }
const SourcePackage *TarBall::get_package() const
{
package(p),
name(n),
tool(0),
- buildable(false),
building(false),
rebuild(false),
deps_ready(false),
Task *Target::build()
{
- if(!buildable)
+ if(!tool)
{
rebuild = false;
return 0;
}
- if(!tool)
- throw logic_error("buildable && !tool");
// XXX Minor breach of OO here
if(FileTarget *ft = dynamic_cast<FileTarget *>(this))
std::string name;
const Tool *tool;
- bool buildable;
bool building;
bool rebuild;
std::string rebuild_reason;
void set_tool(const Tool &);
const Tool *get_tool() const { return tool; }
- bool is_buildable() const { return buildable; }
+ bool is_buildable() const { return tool!=0; }
bool get_rebuild() const { return rebuild; }
const std::string &get_rebuild_reason() const { return rebuild_reason; }
bool is_installable() const { return !install_location.empty(); }