Skip to content

Commit

Permalink
Bump to dune 2.7
Browse files Browse the repository at this point in the history
  Add ppx_bitstring as dependency
  • Loading branch information
bobot committed Dec 10, 2020
1 parent 05d5f9c commit 85fb24d
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
.PHONY: all test clean

all:
dune build
dune build @install

test:
dune runtest
Expand Down
3 changes: 1 addition & 2 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
(lang dune 1.1)
(using fmt 1.2)
(lang dune 2.7)
12 changes: 7 additions & 5 deletions examples/dune
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@
(executable
(name lattice_lablgtk)
(modules lattice_lablgtk)
(libraries threads mlpost-lablgtk))
(libraries threads mlpost-lablgtk)
(optional)
)

(include dune.inc)

(executable
(name gen_dune)
(modules gen_dune))

(alias
(name promote)
(rule
(alias promote)
(action
(diff dune.inc dune.inc.gen)))

Expand All @@ -36,8 +38,8 @@

; test of the executable

(alias
(name runtest)
(rule
(alias runtest)
(deps
(package mlpost))
(action
Expand Down
20 changes: 10 additions & 10 deletions examples/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

(rule (with-stdout-to dune.boxes.inc.gen (run ./gen_dune.exe leaf boxes %{read-lines:boxes.figures})))

(alias (name promote) (action (diff dune.boxes.inc dune.boxes.inc.gen)))
(rule (alias promote) (action (diff dune.boxes.inc dune.boxes.inc.gen)))
; Generated by gen_dune.ml
(include dune.paths.inc)

Expand All @@ -17,7 +17,7 @@

(rule (with-stdout-to dune.paths.inc.gen (run ./gen_dune.exe leaf paths %{read-lines:paths.figures})))

(alias (name promote) (action (diff dune.paths.inc dune.paths.inc.gen)))
(rule (alias promote) (action (diff dune.paths.inc dune.paths.inc.gen)))
; Generated by gen_dune.ml
(include dune.tree.inc)

Expand All @@ -27,7 +27,7 @@

(rule (with-stdout-to dune.tree.inc.gen (run ./gen_dune.exe leaf tree %{read-lines:tree.figures})))

(alias (name promote) (action (diff dune.tree.inc dune.tree.inc.gen)))
(rule (alias promote) (action (diff dune.tree.inc dune.tree.inc.gen)))
; Generated by gen_dune.ml
(include dune.label.inc)

Expand All @@ -37,7 +37,7 @@

(rule (with-stdout-to dune.label.inc.gen (run ./gen_dune.exe leaf label %{read-lines:label.figures})))

(alias (name promote) (action (diff dune.label.inc dune.label.inc.gen)))
(rule (alias promote) (action (diff dune.label.inc dune.label.inc.gen)))
; Generated by gen_dune.ml
(include dune.automata.inc)

Expand All @@ -47,7 +47,7 @@

(rule (with-stdout-to dune.automata.inc.gen (run ./gen_dune.exe leaf automata %{read-lines:automata.figures})))

(alias (name promote) (action (diff dune.automata.inc dune.automata.inc.gen)))
(rule (alias promote) (action (diff dune.automata.inc dune.automata.inc.gen)))
; Generated by gen_dune.ml
(include dune.hist.inc)

Expand All @@ -57,7 +57,7 @@

(rule (with-stdout-to dune.hist.inc.gen (run ./gen_dune.exe leaf hist %{read-lines:hist.figures})))

(alias (name promote) (action (diff dune.hist.inc dune.hist.inc.gen)))
(rule (alias promote) (action (diff dune.hist.inc dune.hist.inc.gen)))
; Generated by gen_dune.ml
(include dune.radar.inc)

Expand All @@ -67,7 +67,7 @@

(rule (with-stdout-to dune.radar.inc.gen (run ./gen_dune.exe leaf radar %{read-lines:radar.figures})))

(alias (name promote) (action (diff dune.radar.inc dune.radar.inc.gen)))
(rule (alias promote) (action (diff dune.radar.inc dune.radar.inc.gen)))
; Generated by gen_dune.ml
(include dune.real_plot.inc)

Expand All @@ -77,7 +77,7 @@

(rule (with-stdout-to dune.real_plot.inc.gen (run ./gen_dune.exe leaf real_plot %{read-lines:real_plot.figures})))

(alias (name promote) (action (diff dune.real_plot.inc dune.real_plot.inc.gen)))
(rule (alias promote) (action (diff dune.real_plot.inc dune.real_plot.inc.gen)))
; Generated by gen_dune.ml
(include dune.dot_dot.inc)

Expand All @@ -87,7 +87,7 @@

(rule (with-stdout-to dune.dot_dot.inc.gen (run ./gen_dune.exe leaf dot_dot %{read-lines:dot_dot.figures})))

(alias (name promote) (action (diff dune.dot_dot.inc dune.dot_dot.inc.gen)))
(rule (alias promote) (action (diff dune.dot_dot.inc dune.dot_dot.inc.gen)))
; Generated by gen_dune.ml
(include dune.color.inc)

Expand All @@ -97,5 +97,5 @@

(rule (with-stdout-to dune.color.inc.gen (run ./gen_dune.exe leaf color %{read-lines:color.figures})))

(alias (name promote) (action (diff dune.color.inc dune.color.inc.gen)))
(rule (alias promote) (action (diff dune.color.inc dune.color.inc.gen)))

2 changes: 1 addition & 1 deletion examples/gen_dune.ml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ let mode_general () =
@\n"
file file file;
Format.printf
"(alias (name promote) (action (diff dune.%s.inc dune.%s.inc.gen)))@\n"
"(rule (alias promote) (action (diff dune.%s.inc dune.%s.inc.gen)))@\n"
file file)
examples

Expand Down
5 changes: 3 additions & 2 deletions mlpost.opam
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ depends: [
"ocaml" { >= "4.07.0" }
"ocamlfind" #during execution also
"bitstring" { >= "3.0.0" }
"cairo2"
"dune"
"ppx_bitstring"
"cairo2" { >= "0.6.2" }
"dune" { >= "2.7.0" }
]
11 changes: 4 additions & 7 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
(public_name mlpost)
(synopsis "OCaml interface to Mlpost, Cairo, Pgf")
(libraries unix bitstring cairo2 mlpost_version)
(preprocess
(pps ppx_bitstring img))
(c_names ml_mlpost_ft)
(c_library_flags
(:include c_library_flags.sexp))
(c_flags
(:include c_flags.sexp)))
(preprocess (pps ppx_bitstring img))
(foreign_stubs (language c) (names ml_mlpost_ft) (flags (:include c_flags.sexp)))
(c_library_flags (:include c_library_flags.sexp))
)

(ocamllex scan_prelude pfb_lexer map_lexer)

Expand Down

0 comments on commit 85fb24d

Please sign in to comment.