]> git.tdb.fi Git - builder.git/blobdiff - source/target.cpp
Target::build is virtual, so put the special case in the appropriate class
[builder.git] / source / target.cpp
index 352b788823534b464ddf609833b826108723c45f..a9ad8e7063931006a3a6b3ba5de961a6d1f33fdf 100644 (file)
@@ -20,7 +20,7 @@ Target::Target(Builder &b, const string &n):
        state(INIT),
        primary_target(0)
 {
-       builder.add_target(this);
+       builder.get_build_graph().add_target(this);
 }
 
 void Target::add_dependency(Target &dep)
@@ -122,13 +122,6 @@ void Target::prepare()
 
 Task *Target::build()
 {
-       if(!tool)
-       {
-               // This special case is needed for VirtualTargets
-               state = UPTODATE;
-               return 0;
-       }
-
        Task *task = tool->run(*this);
        task->signal_finished.connect(sigc::mem_fun(this, &Target::build_finished));
        state = BUILDING;