ref: 56c2dd5196a5ca417f2893c374711b2c3ed003d9
dir: /mbld/subdir.myr/
use std
use "types.use"
use "util.use"
pkg bld =
const subdirs : (p : build#, subs : byte[:][:], targ : std.option(byte[:]) -> void)
;;
const subdirs = {p, subs, targ
for s in subs
std.put("Entering directory '%s'\n", s)
if !std.chdir(s)
std.fatal(1, "unable to enter directory %s\n", s)
;;
run(p.cmd)
std.put("Leaving directory '%s'\n", s)
if !std.chdir("..")
std.fatal(1, "unable to leave directory %s\n", s)
;;
;;
}