make actions always execute regardless of files existing

master
Daniel Kolesa 2015-11-21 18:30:11 +00:00
parent b3bf83dfc5
commit 6867946e97
1 changed files with 34 additions and 34 deletions

View File

@ -108,7 +108,7 @@ struct ObState {
Rule(): target(), deps(), func(nullptr), action(false) {}
Rule(const Rule &r): target(r.target), deps(r.deps), func(r.func),
action(false) {
action(r.action) {
cscript::bcode_ref(func);
}
~Rule() { cscript::bcode_unref(func); }
@ -200,16 +200,17 @@ struct ObState {
int ret = wait_result([&rlist, &subdeps, &tname, this]() {
return exec_list(rlist, subdeps, tname);
});
if (!ret && ob_check_exec(tname, subdeps)) {
Uint32 *func = nullptr;
bool act = false;
for (auto &sr: rlist.iter()) {
Rule &r = *sr.rule;
if (r.func) {
func = r.func;
act = r.action;
break;
}
}
if (func) {
if ((!ret && (act || ob_check_exec(tname, subdeps))) && func) {
StackedValue targetv, sourcev, sourcesv;
targetv.id = cs.new_ident("target");
@ -239,7 +240,6 @@ struct ObState {
return cs.run_int(func);
}
}
return ret;
}