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

adds the dune build system #68

Merged
merged 3 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 @@ -17,3 +17,4 @@

# generated by ./configure
/Makefile.config
/_build/
5 changes: 5 additions & 0 deletions dune
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))))
4 changes: 4 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(lang dune 2.0)
(name piqilib)

(package (name piqilib))
31 changes: 15 additions & 16 deletions opam
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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}
]
]
82 changes: 82 additions & 0 deletions piqilib/dune
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))))
1 change: 1 addition & 0 deletions piqilib/make_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
echo "let version = \"$(head -1 ../VERSION)\""
4 changes: 4 additions & 0 deletions src/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(executable
(name run)
(public_name piqi)
(libraries unix piqilib))