add invoke command to exec a rule/action and wait for it
parent
96c1066c37
commit
7d9fac6ae0
|
@ -28,6 +28,10 @@ action info [
|
|||
echo "number of jobs:" $numjobs
|
||||
]
|
||||
|
||||
action test_invoke [
|
||||
invoke test
|
||||
]
|
||||
|
||||
// dependencies
|
||||
|
||||
rule foo.o foo.h
|
||||
|
|
4
main.cc
4
main.cc
|
@ -456,6 +456,10 @@ int main(int argc, char **argv) {
|
|||
cs.result->set_str_dup(ret);
|
||||
});
|
||||
|
||||
os.cs.add_command("invoke", "s", [](CsState &cs, const char *name) {
|
||||
cs.result->set_int(((ObState &)cs).exec_main(name));
|
||||
});
|
||||
|
||||
cs_register_globs(os.cs);
|
||||
|
||||
if ((!fcont.empty() && !os.cs.run_bool(fcont)) || !os.cs.run_file(fname))
|
||||
|
|
Loading…
Reference in New Issue