Install from the symlink directory

This commit is contained in:
Jeremie Dimino 2017-03-01 11:38:02 +00:00
parent c3228ee95e
commit 56f6e5bca3
1 changed files with 7 additions and 5 deletions

View File

@ -1714,10 +1714,12 @@ module Gen(P : Params) = struct
let local_install_rules (entries : Install.Entry.t list) ~package = let local_install_rules (entries : Install.Entry.t list) ~package =
let install_dir = Config.local_install_dir ~context:ctx.name in let install_dir = Config.local_install_dir ~context:ctx.name in
List.iter entries ~f:(fun entry -> List.map entries ~f:(fun entry ->
let dst = Install.Entry.relative_installed_path entry ~package in let dst =
add_rule Path.append install_dir (Install.Entry.relative_installed_path entry ~package)
(Build.symlink ~src:entry.src ~dst:(Path.append install_dir dst))) in
add_rule (Build.symlink ~src:entry.src ~dst);
{ entry with src = dst })
let install_file package_path package = let install_file package_path package =
let entries = let entries =
@ -1760,7 +1762,7 @@ module Gen(P : Params) = struct
let fn = let fn =
Path.relative (Path.append ctx.build_dir package_path) (package ^ ".install") Path.relative (Path.append ctx.build_dir package_path) (package ^ ".install")
in in
local_install_rules entries ~package; let entries = local_install_rules entries ~package in
add_rule add_rule
(Build.path_set (Install.files entries) >>> (Build.path_set (Install.files entries) >>>
Build.create_file ~target:fn (fun () -> Build.create_file ~target:fn (fun () ->