diff --git a/Makefile b/Makefile index 18b148f..ef4e466 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,11 @@ reinstall: $(MAKE) uninstall $(MAKE) install + +.PHONY: examples +examples: + jbuilder build @examples + .PHONY: test test: jbuilder runtest diff --git a/examples/custom-utop/Makefile b/examples/custom-utop/Makefile deleted file mode 100644 index 296aad4..0000000 --- a/examples/custom-utop/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -OC := ocamlbuild -classic-display -no-links -use-ocamlfind - -build: - $(OC) -tag thread -pkg threads,utop myutop.top - -clean: - $(OC) -clean diff --git a/examples/custom-utop/jbuild b/examples/custom-utop/jbuild new file mode 100644 index 0000000..c19d49d --- /dev/null +++ b/examples/custom-utop/jbuild @@ -0,0 +1,6 @@ +(jbuild_version 1) + +(executable + ((name myutop) + (link_flags (-linkall)) + (libraries (utop)))) diff --git a/examples/custom-utop/myutop_main.ml b/examples/custom-utop/myutop.ml similarity index 100% rename from examples/custom-utop/myutop_main.ml rename to examples/custom-utop/myutop.ml diff --git a/examples/custom-utop/myutop.mltop b/examples/custom-utop/myutop.mltop deleted file mode 100644 index 8f42e2d..0000000 --- a/examples/custom-utop/myutop.mltop +++ /dev/null @@ -1 +0,0 @@ -Myutop_main diff --git a/examples/interact/Makefile b/examples/interact/Makefile deleted file mode 100644 index db68ce4..0000000 --- a/examples/interact/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -OC := ocamlbuild -classic-display -no-links -use-ocamlfind - -build: - $(OC) -pkg threads,compiler-libs.toplevel,utop test_program.byte - -clean: - $(OC) -clean diff --git a/examples/interact/_tags b/examples/interact/_tags deleted file mode 100644 index 0e8cb64..0000000 --- a/examples/interact/_tags +++ /dev/null @@ -1 +0,0 @@ -true: thread, linkall, predicate(create_toploop), warn(-40), bin_annot diff --git a/examples/interact/jbuild b/examples/interact/jbuild new file mode 100644 index 0000000..68e1edd --- /dev/null +++ b/examples/interact/jbuild @@ -0,0 +1,6 @@ +(jbuild_version 1) + +(executable + ((name test_program) + (link_flags (-linkall)) + (libraries (utop)))) diff --git a/jbuild b/jbuild index 092c012..c9633c7 100644 --- a/jbuild +++ b/jbuild @@ -3,3 +3,8 @@ (install ((section share) (files (utoprc-dark utoprc-light)))) + +(alias + ((name examples) + (deps (examples/custom-utop/myutop.bc + examples/interact/test_program.bc))))