-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for dune and use it from opam (Fixes #66) The existing build system based on OCamlMake files left untouched. We build only essentials with dune, so right now tests, booting, and code generation is not implemented. Co-authored-by: Anton Lavrik <[email protected]>
- Loading branch information
Showing
7 changed files
with
112 additions
and
16 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 |
---|---|---|
|
@@ -17,3 +17,4 @@ | |
|
||
# generated by ./configure | ||
/Makefile.config | ||
/_build/ |
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,5 @@ | ||
(env (dev (flags (:standard | ||
-warn-error -A))) | ||
(release (flags (:standard | ||
-warn-error -A | ||
-w -6-9-27-32..34-37-50-58)))) |
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,4 @@ | ||
(lang dune 2.0) | ||
(name piqilib) | ||
|
||
(package (name piqilib)) |
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 |
---|---|---|
|
@@ -5,21 +5,6 @@ authors: "Anton Lavrik <[email protected]>" | |
maintainer: "Anton Lavrik <[email protected]>" | ||
homepage: "http://piqi.org" | ||
bug-reports: "https://github.com/alavrik/piqi/issues" | ||
build: [ | ||
["./configure" "--prefix" prefix] | ||
[make] | ||
[make "ocaml"] | ||
[make "test"] {with-test} | ||
] | ||
install: [ | ||
[make "install"] | ||
[make "ocaml-install"] | ||
] | ||
remove: [ | ||
["rm" "-f" "%{prefix}%/bin/piqi"] | ||
["ocamlfind" "remove" "piqilib"] | ||
] | ||
flags: light-uninstall | ||
depends: [ | ||
"ocaml" {>= "4.03"} | ||
"ocamlfind" {build} | ||
|
@@ -28,4 +13,18 @@ depends: [ | |
"xmlm" | ||
"base64" {>="3.1.0"} | ||
] | ||
dev-repo: "git://github.com/alavrik/piqi" | ||
dev-repo: "git+https://github.com/alavrik/piqi" | ||
build: [ | ||
["dune" "subst"] {dev} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
"piqilib" | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] |
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,82 @@ | ||
(library | ||
(name piqilib) | ||
(public_name piqilib) | ||
(wrapped false) | ||
(libraries easy-format xmlm base64 sedlex) | ||
(preprocess (pps sedlex.ppx)) | ||
(modules_without_implementation piqi_json_type piqi_xml_type) | ||
(foreign_stubs (language c) (names piqi_c_impl)) | ||
(modules | ||
piqi_version | ||
|
||
piqi_piqirun | ||
piqi_piqi | ||
|
||
piqi_util | ||
piqloc | ||
|
||
piq_piqi | ||
piq_ast | ||
|
||
piqi_impl_piqi | ||
piqi_boot | ||
|
||
piqi_c | ||
|
||
piqi_config | ||
piqi_iolist | ||
piqi_name | ||
piqi_common | ||
piqi_file | ||
piqi_command | ||
piqi_protobuf | ||
piqi_db | ||
|
||
piqi_utf8 | ||
piq_lexer | ||
piq_parser | ||
piq_gen | ||
|
||
piqi_json_type | ||
piqi_xml_type | ||
|
||
piqi_objstore | ||
piqobj | ||
piqobj_common | ||
piqobj_to_protobuf | ||
piqobj_of_protobuf | ||
piqobj_to_piq | ||
piqobj_of_piq | ||
|
||
piq | ||
piqi | ||
|
||
piqi_pp | ||
|
||
piqi_json_parser | ||
piqi_json_gen | ||
piqi_json | ||
|
||
piqi_base64 | ||
piqobj_to_json | ||
piqobj_of_json | ||
|
||
piqi_xml | ||
piqobj_to_xml | ||
piqobj_of_xml | ||
|
||
piqi_convert | ||
piqi_compile | ||
|
||
piqi_light | ||
piqi_getopt)) | ||
|
||
(ocamllex piqi_json_parser) | ||
|
||
(rule | ||
(target piqi_version.ml) | ||
(deps | ||
(file make_version.sh) | ||
(file ../VERSION)) | ||
(action (with-stdout-to %{target} | ||
(bash ./make_version.sh)))) |
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 @@ | ||
echo "let version = \"$(head -1 ../VERSION)\"" |
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,4 @@ | ||
(executable | ||
(name run) | ||
(public_name piqi) | ||
(libraries unix piqilib)) |