ref: f080badd0962a2ab65a4dcf4f4bbd813fc669646
parent: 5d8f48486d19ffea0833a336b2ca8d34af410057
author: Ori Bernstein <[email protected]>
date: Mon May 4 07:04:50 EDT 2015
Init the parsed option list.
--- a/libstd/optparse.myr
+++ b/libstd/optparse.myr
@@ -53,6 +53,10 @@
var ctx : optctx
var parsed
+ parsed = [
+ .opts=[][:],
+ .args=[][:]
+ ]
optinit(&ctx, args, def)
while !optdone(&ctx)
parsed.opts = slpush(parsed.opts, optnext(&ctx))
--- a/mbld/main.myr
+++ b/mbld/main.myr
@@ -28,7 +28,6 @@
[.opt='t', .desc="list all available targets"],
[.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="root", .desc="install into 'root'"],
[.opt='b', .arg="bin", .desc="compile binary named 'bin' from inputs"],
@@ -38,6 +37,7 @@
[.opt='M', .arg="mu", .desc="merge uses with 'mu' instead of the default muse"],
][:]
])
+
bld.initopts()
for opt in cmd.opts
match opt