Add an example showing how to build a custom utop with ocamlbuild
This commit is contained in:
parent
30bbe90ac6
commit
cce03d4c83
|
@ -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.
|
||||
|
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
Myutop_main
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
(* Start utop. It never returns. *)
|
||||
let () = UTop_main.main ()
|
Loading…
Reference in New Issue