Skip to content

Commit 5e20f90

Browse files
committed
Link with the markdown path
1 parent c4b6839 commit 5e20f90

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/dune_rules/odoc.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,11 @@ let odoc_include_flags ctx pkg requires =
417417
let link_odoc_rules sctx (odoc_file : odoc_artefact) ~pkg ~requires =
418418
let ctx = Super_context.context sctx in
419419
let deps = Dep.deps ctx pkg requires in
420+
let dir = Path.build (Path.Build.parent_exn odoc_file.odocl_file) in
420421
let run_odoc =
421422
run_odoc
422423
sctx
423-
~dir:(Path.build (Paths.html_root ctx))
424+
~dir
424425
"link"
425426
~quiet:false
426427
~flags_for:(Some odoc_file.odoc_file)
@@ -1174,11 +1175,10 @@ let gen_rules sctx ~dir rest =
11741175
>>> setup_toplevel_index_rule sctx Json)
11751176
| [ "_markdown" ] -> has_rules (setup_toplevel_index_rule sctx Markdown)
11761177
| [ "_markdown"; lib_unique_name_or_pkg ] ->
1177-
let ctx = Super_context.context sctx in
1178-
let directory_targets = Path.Build.Map.singleton dir Loc.none in
11791178
has_rules
1180-
~directory_targets
1181-
(let* lib, lib_db = Scope_key.of_string (Context.name ctx) lib_unique_name_or_pkg in
1179+
(
1180+
let ctx = Super_context.context sctx in
1181+
let* lib, lib_db = Scope_key.of_string (Context.name ctx) lib_unique_name_or_pkg in
11821182
let* lib =
11831183
let+ lib = Lib.DB.find lib_db lib in
11841184
Option.bind ~f:Lib.Local.of_lib lib

0 commit comments

Comments
 (0)