Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switches to dune #17

Merged
merged 4 commits into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@

# vim:
*.swp
/_build/
1 change: 1 addition & 0 deletions dune
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(env (dev (flags (:standard -warn-error -A))))
5 changes: 5 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(lang dune 2.0)
(name piqi)

(package (name piqi))
(package (name piqirun))
27 changes: 15 additions & 12 deletions opam
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@ authors: "Anton Lavrik <[email protected]>"
maintainer: "Anton Lavrik <[email protected]>"
homepage: "https://github.com/alavrik/piqi-ocaml"
bug-reports: "https://github.com/alavrik/piqi-ocaml/issues"
build: [
[make]
[make "test"] {with-test}
]
install: [
[make "DESTDIR=%{prefix}%" "install"]
]
remove: [
["rm" "-f" "%{prefix}%/bin/piqic-ocaml"]
["ocamlfind" "remove" "piqirun"]
]
flags: light-uninstall
depends: [
"ocaml" {>= "4.02.0"}
"ocamlfind" {build}
Expand All @@ -24,3 +12,18 @@ depends: [
"num" {with-test}
]
dev-repo: "git://github.com/alavrik/piqi-ocaml"

build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
"piqi,piqirun"
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
13 changes: 13 additions & 0 deletions piqic-ocaml/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(executable
(name piqic_ocaml)
(public_name piqic-ocaml)
(package piqi)
(libraries piqilib piqirun bytes stdlib-shims))

(rule
(target piqic_ocaml_version.ml)
(deps
(file make_version.sh)
(file ../VERSION))
(action (with-stdout-to %{target}
(bash ./make_version.sh))))
1 change: 1 addition & 0 deletions piqic-ocaml/make_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
echo "let version = \"$(head -1 ../VERSION)\""
13 changes: 13 additions & 0 deletions piqirun/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(library
(name piqirun)
(public_name piqirun.pb)
(wrapped false)
(libraries piqilib stdlib-shims)
(modules piqirun))

(library
(name piqirun_ext)
(public_name piqirun.ext)
(wrapped false)
(libraries piqilib stdlib-shims)
(modules piqirun_ext))