Skip to content

Commit 551c0a1

Browse files
author
Konstantina Chremmou
committed
Moved from jbuilder to dune and deprecated xcp in favour of xapi-idl.
Signed-off-by: Konstantina Chremmou <[email protected]>
1 parent 33904de commit 551c0a1

File tree

5 files changed

+65
-67
lines changed

5 files changed

+65
-67
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ MANDIR=/usr/share/man
44
.PHONY: release build install uninstall clean doc reindent test
55

66
release:
7-
jbuilder build @install
7+
dune build @install --profile=release
88

99
build:
10-
jbuilder build @install --dev
10+
dune build @install
1111

1212
install:
1313
install -m 0755 _build/install/default/bin/xapi-storage-script $(BINDIR)
@@ -18,16 +18,16 @@ uninstall:
1818
rm -f $(MANDIR)/man8/xapi-storage-script.8*
1919

2020
clean:
21-
jbuilder clean
21+
dune clean
2222

2323
# requires odoc
2424
doc:
25-
jbuilder build @doc
25+
dune build @doc --profile=release
2626

2727
reindent:
2828
git ls-files '*.ml*' | xargs ocp-indent --syntax cstruct -i
2929

3030
test:
31-
jbuilder runtest
31+
dune runtest --profile=release
3232

3333
.DEFAULT_GOAL := release

dune

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
(* -*- tuareg -*- *)
2+
let version =
3+
let ic = open_in "./VERSION" in
4+
let version = input_line ic in
5+
close_in ic;
6+
version
7+
8+
let () = Printf.ksprintf Jbuild_plugin.V1.send {|
9+
10+
(rule
11+
(targets version.ml)
12+
(deps)
13+
(action
14+
(with-stdout-to %%{targets} (echo "let version = \"%s\"\n"))
15+
)
16+
)
17+
18+
(executable
19+
(name main)
20+
(public_name xapi-storage-script)
21+
(flags (:standard -w -39))
22+
(libraries
23+
async_inotify
24+
message-switch-async
25+
message-switch-unix
26+
rpclib
27+
rpclib-async
28+
sexplib
29+
threads
30+
xapi-stdext-date
31+
xapi-storage
32+
xapi-idl
33+
xapi-idl.rrd
34+
xapi-idl.storage
35+
)
36+
(preprocess (pps ppx_deriving_rpc ppx_sexp_conv))
37+
)
38+
39+
(rule
40+
(targets xapi-storage-script.8)
41+
(deps (:x main.exe))
42+
(action
43+
(with-stdout-to %%{targets} (run %%{x} --help=groff))
44+
)
45+
)
46+
47+
(install
48+
(section man)
49+
(files (xapi-storage-script.8 as man8/xapi-storage-script.8))
50+
)
51+
52+
(alias
53+
(name runtest)
54+
(deps (:x main.exe) (source_tree test/volume))
55+
(action (bash "./%%{x} --root=$PWD/test --self-test-only=true"))
56+
)
57+
|} version

dune-project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(lang dune 1.4)

jbuild

Lines changed: 0 additions & 60 deletions
This file was deleted.

xapi-storage-script.opam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ homepage: "https://github.com/xapi-project/xapi-storage-script"
77
bug-reports: "https://github.com/xapi-project/xapi-storage-script/issues"
88
dev-repo: "git://github.com/xapi-project/xapi-storage-script"
99
tags: [ "org:xapi-project" ]
10-
build: [[ "jbuilder" "build" "-p" name "-j" jobs ]]
10+
build: [[ "dune" "build" "-p" name "-j" jobs ]]
1111
depends: [
1212
"ocaml"
13-
"jbuilder" {build}
13+
"dune" {build}
1414
"xapi-idl" {>= "0.10.0"}
1515
"xapi-storage"
1616
"async" {>= "v0.9.0"}

0 commit comments

Comments
 (0)