Add an example showing how to build a custom utop with ocamlbuild

This commit is contained in:
Jérémie Dimino 2012-10-29 11:11:46 +01:00
parent 30bbe90ac6
commit cce03d4c83
4 changed files with 14 additions and 0 deletions

View File

@ -142,3 +142,6 @@ For example:
Note that if you are not using ocamlfind, you will need to do that
yourself. You have to call `Topfind.don't_load` with the list of all
packages linked with the toplevel.
A full example using ocamlbuild is provided in the
[examples/custom-utop]() directory.

View File

@ -0,0 +1,7 @@
OC := ocamlbuild -classic-display -no-links -use-ocamlfind
build:
$(OC) -pkg threads,utop -cflag -thread -lflag -thread myutop.top
clean:
$(OC) -clean

View File

@ -0,0 +1 @@
Myutop_main

View File

@ -0,0 +1,3 @@
(* Start utop. It never returns. *)
let () = UTop_main.main ()