diff --git a/pkg/pkg.ml b/pkg/pkg.ml new file mode 100644 index 0000000..1a04c2b --- /dev/null +++ b/pkg/pkg.ml @@ -0,0 +1,2 @@ +#use "topfind" +#require "topkg-jbuilder.auto" diff --git a/src/lib/jbuild b/src/lib/jbuild index 8bc1f48..a2d849b 100644 --- a/src/lib/jbuild +++ b/src/lib/jbuild @@ -1,22 +1,3 @@ -(* -*- tuareg -*- *) - -module J = Jbuild_plugin.V1 - -let version = - let ic = open_in_bin "../../utop.opam" in - let rec loop ic = - let line = input_line ic in - try - Scanf.sscanf line "version: %S" (fun x -> x) - with _ -> - loop ic - in - let v = loop ic in - close_in ic; - v - -let () = - Printf.ksprintf J.send {| (jbuild_version 1) (library @@ -24,12 +5,7 @@ let () = (public_name utop) (wrapped false) (modes (byte)) - (libraries (compiler-libs.toplevel findlib_top lambda-term threads)) + (libraries (compiler-libs.toplevel findlib.top lambda-term threads)) (preprocess (action (run ${bin:cppo} -V OCAML:${ocaml_version} ${<}))))) (ocamllex (uTop_lexer)) - -(rule - ((targets (uTop_version.ml)) - (action (with-stdout-to ${@} (echo "let version = \"%s\""))))) -|} version diff --git a/src/lib/uTop.ml b/src/lib/uTop.ml index 4f8729e..0af8603 100644 --- a/src/lib/uTop.ml +++ b/src/lib/uTop.ml @@ -17,7 +17,7 @@ let (>>=) = Lwt.(>>=) module String_set = Set.Make(String) -let version = UTop_version.version +let version = "%%VERSION%%" (* +-----------------------------------------------------------------+ | History | diff --git a/utop.opam b/utop.opam index e3eb99d..5171020 100644 --- a/utop.opam +++ b/utop.opam @@ -1,5 +1,4 @@ opam-version: "1.2" -version: "1.20" maintainer: "jeremie@dimino.org" authors: ["Jérémie Dimino"] license: "BSD3" @@ -7,6 +6,7 @@ homepage: "https://github.com/diml/utop" bug-reports: "https://github.com/diml/utop/issues" dev-repo: "git://github.com/diml/utop.git" build: [ + ["jbuilder" "subst"] {pinned} ["jbuilder" "build" "-p" name "-j" jobs] ] depends: [ @@ -17,8 +17,8 @@ depends: [ "lwt" "react" {>= "1.0.0"} "cppo" {build & >= "1.1.2"} - "findlib_top" - "jbuilder" {build & >= "1.0+beta7"} + "findlib.top" {>= "1.7.2"} + "jbuilder" {build & >= "1.0+beta9"} ] depopts: [ "ppx_tools"