forked from OctaForge/OctaBuild
make actions always execute regardless of files existing
parent
b3bf83dfc5
commit
6867946e97
8
main.cc
8
main.cc
|
@ -108,7 +108,7 @@ struct ObState {
|
||||||
|
|
||||||
Rule(): target(), deps(), func(nullptr), action(false) {}
|
Rule(): target(), deps(), func(nullptr), action(false) {}
|
||||||
Rule(const Rule &r): target(r.target), deps(r.deps), func(r.func),
|
Rule(const Rule &r): target(r.target), deps(r.deps), func(r.func),
|
||||||
action(false) {
|
action(r.action) {
|
||||||
cscript::bcode_ref(func);
|
cscript::bcode_ref(func);
|
||||||
}
|
}
|
||||||
~Rule() { cscript::bcode_unref(func); }
|
~Rule() { cscript::bcode_unref(func); }
|
||||||
|
@ -200,16 +200,17 @@ struct ObState {
|
||||||
int ret = wait_result([&rlist, &subdeps, &tname, this]() {
|
int ret = wait_result([&rlist, &subdeps, &tname, this]() {
|
||||||
return exec_list(rlist, subdeps, tname);
|
return exec_list(rlist, subdeps, tname);
|
||||||
});
|
});
|
||||||
if (!ret && ob_check_exec(tname, subdeps)) {
|
|
||||||
Uint32 *func = nullptr;
|
Uint32 *func = nullptr;
|
||||||
|
bool act = false;
|
||||||
for (auto &sr: rlist.iter()) {
|
for (auto &sr: rlist.iter()) {
|
||||||
Rule &r = *sr.rule;
|
Rule &r = *sr.rule;
|
||||||
if (r.func) {
|
if (r.func) {
|
||||||
func = r.func;
|
func = r.func;
|
||||||
|
act = r.action;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (func) {
|
if ((!ret && (act || ob_check_exec(tname, subdeps))) && func) {
|
||||||
StackedValue targetv, sourcev, sourcesv;
|
StackedValue targetv, sourcev, sourcesv;
|
||||||
|
|
||||||
targetv.id = cs.new_ident("target");
|
targetv.id = cs.new_ident("target");
|
||||||
|
@ -239,7 +240,6 @@ struct ObState {
|
||||||
|
|
||||||
return cs.run_int(func);
|
return cs.run_int(func);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue