shithub: mc

Download patch

ref: fc9b380ddee2c251420e7d26772f68b3a10a9167
parent: f1af8834d4fac147c4fd27591d8a340eac000256
author: Ori Bernstein <[email protected]>
date: Sun May 3 07:03:37 EDT 2015

Clean up mbld init a little.

--- a/mbld/main.myr
+++ b/mbld/main.myr
@@ -20,9 +20,9 @@
 	var bintarg
 	var cmd 
 	var libpath
-	var opts
 
-	opts = [
+	dumponly = false
+	cmd = std.optparse(args, &[
 		.argdesc = "[inputs...]",
 		.opts = [
 			[.opt='t', .desc="list all available targets"],
@@ -36,8 +36,7 @@
 			[.opt='S', .desc="generate assembly when building"],
 			[.opt='d', .desc="dump debugging information for mbld"],
 		][:]
-	]
-	cmd = std.optparse(args, &opts)
+	])
 	bld.initopts()
 	for opt in cmd.opts
 		match opt