summaryrefslogtreecommitdiff
path: root/mbld
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2019-02-04 23:08:25 -0800
committerOri Bernstein <ori@eigenstate.org>2019-02-04 23:08:25 -0800
commit4da95e96e01dac40ff290b1e2cb4e9f641aea398 (patch)
tree7a593eeda26bd46fcd5984e97c2a8c5a730cc62d /mbld
parentbfc9204963426bf0e8121b416458550b8f2616ad (diff)
downloadmc-4da95e96e01dac40ff290b1e2cb4e9f641aea398.tar.gz
Error if we forgot to give code to build.
Diffstat (limited to 'mbld')
-rw-r--r--mbld/main.myr6
1 files changed, 6 insertions, 0 deletions
diff --git a/mbld/main.myr b/mbld/main.myr
index 5212865..62537f8 100644
--- a/mbld/main.myr
+++ b/mbld/main.myr
@@ -67,9 +67,15 @@ const main = {args : byte[:][:]
b = mkbuild(tags)
if targname.len != 0
+ if cmd.args.len == 0
+ std.fatal("nothing to compile\n")
+ ;;
bld.opt_objdir = objdir
ok = buildimm(b, targname, cmd.args)
elif runsrc.len != 0
+ if cmd.args.len == 0
+ std.fatal("nothing to run\n")
+ ;;
bld.opt_objdir = objdir
bld.opt_verbosity = -1
tmp = std.mktemppath("runmyr")