Multi stanza in 1 jbuild build failure

After the change to run ocamldep per module, defining an executable and a
library this way doesn't work anymore.
This commit is contained in:
Rudi Grinberg 2018-02-20 10:37:08 +07:00
parent eefe4347f1
commit b27486b4bd
5 changed files with 26 additions and 0 deletions

View File

@ -348,3 +348,13 @@
(progn
(run ${exe:cram.exe} -ocamlv ${ocaml_version} -skip-versions 4.02.3 run.t)
(diff? run.t run.t.corrected)))))))
(alias
((name runtest)
(deps ((files_recursively_in test-cases/ocamldep-multi-stanzas)))
(action
(chdir test-cases/ocamldep-multi-stanzas
(setenv JBUILDER ${bin:jbuilder}
(progn
(run ${exe:cram.exe} run.t)
(diff? run.t run.t.corrected)))))))

View File

@ -0,0 +1,9 @@
(jbuild_version 1)
(library
((name lib)
(modules (:standard \ test))))
(executable
((name test)
(libraries (lib))))

View File

@ -0,0 +1 @@
let run () = print_endline "foo bar"

View File

@ -0,0 +1,5 @@
$ $JBUILDER exec ./test.exe -j1 --debug-dep --display short --root .
Multiple rules generated for _build/default/lib.o:
- <internal location>
- <internal location>
[1]

View File

@ -0,0 +1 @@
Lib.run ();;