summaryrefslogtreecommitdiff
path: root/mbld
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-07-24 23:10:12 -0700
committerOri Bernstein <ori@eigenstate.org>2017-07-25 22:23:05 -0700
commit36d8051e6fb675aff71d37c9ab79e93239e1521f (patch)
treea4e0321464d3e173502ad6f6bbc904d4b7e35846 /mbld
parentb22fbb6351d844d58002c326809258016595ed31 (diff)
downloadmc-36d8051e6fb675aff71d37c9ab79e93239e1521f.tar.gz
Remove unused/useless options.
Diffstat (limited to 'mbld')
-rw-r--r--mbld/main.myr31
-rw-r--r--mbld/test.myr6
2 files changed, 10 insertions, 27 deletions
diff --git a/mbld/main.myr b/mbld/main.myr
index 6262fb1..b9134b4 100644
--- a/mbld/main.myr
+++ b/mbld/main.myr
@@ -15,7 +15,6 @@ use "syssel"
const main = {args : byte[:][:]
var b : bld.build#
- var bintarg
var targname
var runsrc
var path
@@ -28,15 +27,15 @@ const main = {args : byte[:][:]
cmd = std.optparse(args, &[
.argdesc = "[inputs...]",
.opts = [
+ [.opt='j', .arg="jobs", .desc="build with at most 'jobs' jobs"],
[.opt='t', .arg="tag", .desc="build with specified systag"],
[.opt='S', .desc="generate assembly when building"],
[.opt='d', .desc="dump debugging information for mbld"],
[.opt='I', .arg="inc", .desc="add 'inc' to your include path"],
[.opt='R', .arg="runsrc", .desc="source to compile and run"],
[.opt='B', .arg="base", .desc="install into 'base'"],
- [.opt='b', .arg="bin", .desc="compile binary named 'bin' from inputs"],
- [.opt='l', .arg="lib", .desc="compile lib named 'lib' from inputs"],
- [.opt='r', .arg="rt", .desc="link against runtime 'rt' instead of default"],
+ [.opt='b', .arg="bin", .desc="compile binary 'bin' from inputs"],
+ [.opt='r', .arg="rt", .desc="link against runtime 'rt'"],
[.opt='o', .arg="dir", .desc="output directory"],
][:]
])
@@ -53,27 +52,12 @@ const main = {args : byte[:][:]
| ('I', arg): std.slpush(&bld.opt_incpaths, arg)
| ('B', arg): bld.opt_instbase = arg
| ('t', tag): std.slpush(&tags, tag)
+ | ('j', arg): bld.opt_maxproc = std.getv(std.intparse(arg), 1)
| ('R', arg): runsrc = arg
| ('o', arg): bld.opt_objdir = arg
- | ('b', arg):
- targname = arg
- bintarg = true
- | ('l', arg):
- targname = arg
- bintarg = false
- | ('r', arg):
- if std.sleq(arg, "none")
- bld.opt_runtime = ""
- else
- bld.opt_runtime = arg
- ;;
- /*
- internal undocumented args; used by compiler suite for
- building with an uninstalled compiler.
- */
- | ('d', arg): bld.opt_debug = true
- | _: std.die("unreachable\n")
-
+ | ('b', arg): targname = arg
+ | ('r', arg): bld.opt_runtime = arg
+ | _: std.die("unreachable\n")
;;
;;
path = std.pathcat(bld.opt_instbase, config.Libpath)
@@ -104,7 +88,6 @@ const main = {args : byte[:][:]
bld.deps(b)
bld.testdeps(b)
bld.resolve(b)
- /*bld.configure()*/
/* default: buildall */
if cmd.args.len == 0
ok = bld.buildtarg(b, "all")
diff --git a/mbld/test.myr b/mbld/test.myr
index 7f244fa..723bd85 100644
--- a/mbld/test.myr
+++ b/mbld/test.myr
@@ -56,9 +56,10 @@ const runtest = {b, n, failed
var dir, res, log, logfd
var sub
+ mbldput("run {}: ", n.lbl)
dir = std.pathcat(b.basedir, n.wdir)
- mbldput("run {} in {}:\t", n.lbl, dir)
std.chdir(dir)
+ std.slfree(dir)
match std.spork(n.cmd)
| `std.Err m:
std.fatal("\nunable to run test: {}\n", m)
@@ -84,10 +85,9 @@ const runtest = {b, n, failed
;;
;;
if !res
- std.slpush(failed, std.fmt("{j= } || {}", n.cmd, dir))
+ std.slpush(failed, std.fmt("{j= }", n.cmd))
;;
;;
- //std.slfree(dir)
-> res
}