if(dep==this)
throw invalid_argument("Target::add_depend");
depends.push_back(dep);
- dep->signal_bubble_rebuild.connect(sigc::mem_fun(this, &Target::check_rebuild));
+ if(state>PREPARING)
+ dep->signal_bubble_rebuild.connect(sigc::mem_fun(this, &Target::check_rebuild));
}
void Target::prepare()
check_rebuild();
if(state==PREPARING)
state = UPTODATE;
+
+ for(Dependencies::iterator i=depends.begin(); i!=depends.end(); ++i)
+ (*i)->signal_bubble_rebuild.connect(sigc::mem_fun(this, &Target::check_rebuild));
}
Task *Target::build()
state = REBUILD;
rebuild_reason = reason;
- signal_bubble_rebuild.emit();
builder.get_logger().log("rebuild", format("Rebuilding %s: %s", name, reason));
+
+ signal_bubble_rebuild.emit();
}
void Target::build_finished(bool /*success*/)