summaryrefslogtreecommitdiff
path: root/mbld
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-08-14 01:17:41 -0700
committerOri Bernstein <ori@eigenstate.org>2017-08-14 01:17:41 -0700
commitbd96cb6a0a361a62871f70c07fc350bc2264b087 (patch)
treefc921e25cce50f4a6b3c74606f0fb4991361342d /mbld
parentfd499b39fd02fa18c403a423e908bd39b1e8013d (diff)
downloadmc-bd96cb6a0a361a62871f70c07fc350bc2264b087.tar.gz
Mbld now generates directories properly.
Includes some mkdirs fixes for 9front.
Diffstat (limited to 'mbld')
-rw-r--r--mbld/build.myr10
1 files changed, 8 insertions, 2 deletions
diff --git a/mbld/build.myr b/mbld/build.myr
index ab46571..1d81c6f 100644
--- a/mbld/build.myr
+++ b/mbld/build.myr
@@ -71,6 +71,7 @@ const launch = {b, n
var pid
if stale(b, n)
+ mkout(n)
pid = run(n.cmd, "")
std.htput(b.proc, pid, n)
else
@@ -119,7 +120,6 @@ const unblock = {b, n
std.slpush(&b.queue, g)
;;
;;
-
}
const stale = {b, n
@@ -137,7 +137,13 @@ const stale = {b, n
| `std.Err e: n.mtime = 0
;;
;;
- -> staletime >= n.mtime
+ -> staletime > n.mtime
+}
+
+const mkout = {n
+ for g : n.gen
+ std.mkpath(std.dirname(g))
+ ;;
}
const fail = {b, pid, failtype