Skip to content

Commit

Permalink
fix: always start from lib_subdir when installing module sources
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
  • Loading branch information
anmonteiro authored and rgrinberg committed Feb 27, 2023
1 parent b9c1224 commit 5c967b1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/dune_rules/install_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,15 @@ end = struct
in
(sub_dir, dst)
in
let sub_dir =
match sub_dir with
| None -> lib_subdir
| Some subdir ->
Some
(match lib_subdir with
| None -> subdir
| Some lib_subdir -> Filename.concat lib_subdir subdir)
in
make_entry ?sub_dir Lib source ?dst))
in
let { Lib_config.has_native; ext_obj; _ } = lib_config in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ Test paths on public libraries with `.` are correct
$ cat b/_build/default/b.install
lib: [
"_build/install/default/lib/b/META"
"_build/install/default/lib/b/child/bar.ml" {"child/bar.ml"}
"_build/install/default/lib/b/child/child.ml" {"child/child.ml"}
"_build/install/default/lib/b/dune-package"
"_build/install/default/lib/b/sub/b.a" {"sub/b.a"}
"_build/install/default/lib/b/sub/b.cma" {"sub/b.cma"}
Expand All @@ -89,6 +87,8 @@ Test paths on public libraries with `.` are correct
"_build/install/default/lib/b/sub/b__Foo.cmi" {"sub/b__Foo.cmi"}
"_build/install/default/lib/b/sub/b__Foo.cmt" {"sub/b__Foo.cmt"}
"_build/install/default/lib/b/sub/b__Foo.cmx" {"sub/b__Foo.cmx"}
"_build/install/default/lib/b/sub/child/bar.ml" {"sub/child/bar.ml"}
"_build/install/default/lib/b/sub/child/child.ml" {"sub/child/child.ml"}
"_build/install/default/lib/b/sub/foo.ml" {"sub/foo.ml"}
]
libexec: [
Expand Down

0 comments on commit 5c967b1

Please sign in to comment.