diff options
author | Ori Bernstein <ori@eigenstate.org> | 2018-10-28 12:54:47 -0700 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2018-10-28 13:17:17 -0700 |
commit | d92ff16a7e9ba2919746620fac40c798b06955ce (patch) | |
tree | edf6544e4656d9601377eee180e9995c2ddd609c /mbld | |
parent | 666970ff83272349c1713169bf7cb49964366fb1 (diff) | |
download | mc-d92ff16a7e9ba2919746620fac40c798b06955ce.tar.gz |
Respect outdir and use it for tests.
This makes our gitignore nicer.
Diffstat (limited to 'mbld')
-rw-r--r-- | mbld/main.myr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mbld/main.myr b/mbld/main.myr index 4d74f99..4e14761 100644 --- a/mbld/main.myr +++ b/mbld/main.myr @@ -72,11 +72,11 @@ const main = {args : byte[:][:] b = mkbuild(tags) if targname.len != 0 - ok = buildimm(b, targname, cmd.args) + ok = buildimm(b, targname, cmd.args, bld.opt_objdir) elif runsrc.len != 0 bld.opt_verbosity = -1 tmp = std.mktemppath("runmyr") - ok = buildimm(b, tmp, [runsrc][:]) + ok = buildimm(b, tmp, [runsrc][:], bld.opt_objdir) if ok pid = runcmd(tmp, cmd.args) match std.wait(pid) @@ -115,7 +115,7 @@ const main = {args : byte[:][:] ;; } -const buildimm = {b, targ, inputs +const buildimm = {b, targ, inputs, objdir var mt : bld.myrtarg mt = [ @@ -125,7 +125,7 @@ const buildimm = {b, targ, inputs .incpath=bld.opt_incpaths, .libdeps=[][:] ] - bld.opt_objdir = "" + bld.opt_objdir = objdir std.slpush(&b.all, "__out__") std.htput(b.targs, "__out__", `bld.Bin &mt) bld.deps(b) |