-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CP-26404: Ported build from _oasis to jbuilder.
Signed-off-by: Konstantina Chremmou <[email protected]>
- Loading branch information
Showing
9 changed files
with
80 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,6 @@ | ||
*.annot | ||
*.cmo | ||
*.cma | ||
*.cmi | ||
*.a | ||
*.o | ||
*.cmx | ||
*.cmxs | ||
*.cmxa | ||
_build | ||
.merlin | ||
*.install | ||
|
||
/_build | ||
/*.native | ||
/*.byte | ||
|
||
# OASIS | ||
/setup.log | ||
/setup.data | ||
/setup.ml | ||
/myocamlbuild.ml | ||
/_tags | ||
# DevFiles OASIS plugin: | ||
/Makefile | ||
/configure | ||
*.rej | ||
*.orig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ include a Signed-off-by: line. | |
Maintainers list | ||
---------------- | ||
|
||
* David Scott <[email protected]> | ||
* <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.PHONY: release build install uninstall clean test doc reindent | ||
|
||
release: | ||
jbuilder build @install | ||
|
||
build: | ||
jbuilder build @install --dev | ||
|
||
install: | ||
jbuilder install | ||
|
||
uninstall: | ||
jbuilder uninstall | ||
|
||
clean: | ||
jbuilder clean | ||
|
||
test: | ||
jbuilder runtest | ||
|
||
# requires odoc | ||
doc: | ||
jbuilder build @doc | ||
|
||
reindent: | ||
git ls-files '*.ml*' | xargs ocp-indent --syntax cstruct -i | ||
|
||
|
||
.DEFAULT_GOAL := release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
(* -*- tuareg -*- *) | ||
#require "unix" | ||
|
||
let flags = function | ||
| [] -> "" | ||
| pkgs -> | ||
let cmd = "ocamlfind ocamlc -verbose" ^ ( | ||
List.fold_left (fun acc pkg -> acc ^ " -package " ^ pkg) "" pkgs | ||
) in | ||
let ic = Unix.open_process_in | ||
(cmd ^ " | grep -oEe '-ppx (\"([^\"\\]|\\.)+\"|\\w+)'") | ||
in | ||
let rec go ic acc = | ||
try go ic (acc ^ " " ^ input_line ic) with End_of_file -> close_in ic; acc | ||
in | ||
go ic "" | ||
|
||
let flags = flags ["ppx_deriving_rpc"] | ||
|
||
|
||
let () = Printf.ksprintf Jbuild_plugin.V1.send {| | ||
(jbuild_version 1) | ||
|
||
(executable ( | ||
(name main) | ||
(public_name sm-cli) | ||
(flags (:standard -w -39 %s)) | ||
(libraries ( | ||
xcp | ||
xcp.storage | ||
re | ||
re.str | ||
rpclib | ||
rpclib.json | ||
cmdliner | ||
threads | ||
)) | ||
)) | ||
|} flags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
opam-version: "1.2" | ||
name: "xapi-storage-cli" | ||
maintainer: "[email protected]" | ||
authors: [ "[email protected]" ] | ||
license: "LGPL-2.1 with OCaml linking exception" | ||
homepage: "https://github.com/xapi-project/sm-cli" | ||
bug-reports: "https://github.com/xapi-project/sm-cli/issues" | ||
dev-repo: "https://github.com/xapi-project/sm-cli.git" | ||
build: [ | ||
["oasis" "setup"] | ||
["./configure" "--bindir" "%{bin}%"] | ||
[make] | ||
] | ||
install: [ | ||
[make "install"] | ||
] | ||
remove: [ | ||
["oasis" "setup"] | ||
[make "uninstall"] | ||
] | ||
build: [[ "jbuilder" "build" "-p" name "-j" jobs ]] | ||
depends: [ | ||
"oasis" {build} | ||
"jbuilder" {build} | ||
"base-threads" | ||
"xapi-idl" | ||
"re" | ||
|