summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsgilles@math.umd.edu <sgilles@math.umd.edu>2019-10-18 10:41:59 +0000
committersgilles@math.umd.edu <sgilles@math.umd.edu>2019-10-18 10:41:59 +0000
commit3450935eec9aa87ac23f8b6524a2c9a873105041 (patch)
treed07b7132ef1d631116fa4aad0b3c93bc1dc17b04
parentfdf87b91c1bbd64be75b8438ad6eaf492325e5b4 (diff)
downloadmc-3450935eec9aa87ac23f8b6524a2c9a873105041.tar.gz
Tie return value of mbld to results of specified targets
I'd like to have `mbld test' return non-0 when the tests fail. I think this does it, but I may be over-simplifying. mbld/main.myr | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) Tie return value of mbld to results of specified targets
-rw-r--r--mbld/main.myr16
1 files changed, 8 insertions, 8 deletions
diff --git a/mbld/main.myr b/mbld/main.myr
index 02d3262..fb5e018 100644
--- a/mbld/main.myr
+++ b/mbld/main.myr
@@ -15,7 +15,7 @@ use "syssel"
const main = {args : byte[:][:]
var b, runsrc, objdir, path, cmd
- var targname, tags, pid, ok, r
+ var targname, tags, pid, ok
cmd = std.optparse(args, &[
.argdesc = "[inputs...]",
@@ -104,15 +104,15 @@ const main = {args : byte[:][:]
ok = bld.buildtarg(b, "all")
else
match cmd.args[0]
- | "clean": r = bld.clean(b)
- | "install": r = bld.install(b)
- | "uninstall": r = bld.uninstall(b)
- | "test": r = bld.test(b, cmd.args[1:])
- | "bench": r = bld.bench(b, cmd.args[1:])
- | "list": r = show(b, cmd.args[1:])
+ | "clean": ok = bld.clean(b)
+ | "install": ok = bld.install(b)
+ | "uninstall": ok = bld.uninstall(b)
+ | "test": ok = bld.test(b, cmd.args[1:])
+ | "bench": ok = bld.bench(b, cmd.args[1:])
+ | "list": ok = show(b, cmd.args[1:])
| _:
for target : cmd.args
- r = ok && bld.buildtarg(b, target)
+ ok = ok && bld.buildtarg(b, target)
;;
;;
;;