findlib_top --> findlib.top, topkg setup

This commit is contained in:
Jeremie Dimino 2017-05-26 14:33:20 +01:00
parent ea49d8e947
commit 1497232d4e
4 changed files with 7 additions and 29 deletions

2
pkg/pkg.ml Normal file
View File

@ -0,0 +1,2 @@
#use "topfind"
#require "topkg-jbuilder.auto"

View File

@ -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

View File

@ -17,7 +17,7 @@ let (>>=) = Lwt.(>>=)
module String_set = Set.Make(String)
let version = UTop_version.version
let version = "%%VERSION%%"
(* +-----------------------------------------------------------------+
| History |

View File

@ -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"