summaryrefslogtreecommitdiff
path: root/mbld/install.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2017-01-11 13:57:22 -0800
committerOri Bernstein <ori@markovcorp.com>2017-01-11 13:57:22 -0800
commit4a7e4f29fb015d12bfab35b393aa1facbd2b763b (patch)
tree3db9915fd77a5e2a7381e948c31918a414dbfa12 /mbld/install.myr
parent14d657bd447f9384130ba321324052d94a420ca1 (diff)
downloadmc-4a7e4f29fb015d12bfab35b393aa1facbd2b763b.tar.gz
Create paths for install.
mbld should create paths its putting things into.
Diffstat (limited to 'mbld/install.myr')
-rw-r--r--mbld/install.myr13
1 files changed, 11 insertions, 2 deletions
diff --git a/mbld/install.myr b/mbld/install.myr
index d7c7ae5..82e6777 100644
--- a/mbld/install.myr
+++ b/mbld/install.myr
@@ -65,11 +65,11 @@ const movetargs = {b, rm
-> true
}
-
const movefile = {b, rm, dir, file, prefix, perm
var path
setdir(b, dir)
+ makepath(prefix)
path = std.pathjoin([opt_destdir, opt_instbase, prefix, file][:])
if rm
mbldput("\trm {}\n", path)
@@ -104,7 +104,16 @@ const moveman = {b, rm, dir, man
;;
;;
- manrel = std.fmt("{}{}", opt_manpath, man[sect:])
+ manrel = std.fmt("{}{}", config.Manpath, man[sect:])
+ makepath(manrel)
movefile(b, rm, dir, man, manrel, 0o644)
std.slfree(manrel)
}
+
+const makepath = {prefix
+ var p
+
+ p = std.pathjoin([opt_destdir, opt_instbase, prefix][:])
+ std.mkpath(p)
+ std.slfree(p)
+}