-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdune
More file actions
63 lines (57 loc) · 1.35 KB
/
dune
File metadata and controls
63 lines (57 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
(rule
(targets c_flags.sexp)
(action
(with-stdout-to
c_flags.sexp
(bash "echo '(\"'$(opam var conf-z3:cflags)'\")'"))))
(rule
(targets c_library_flags.sexp)
(action
(with-stdout-to
c_library_flags.sexp
(bash "echo '(\"'$(opam var conf-z3:libs)'\")'"))))
(rule
(targets z3_include_dir.txt)
(action
(with-stdout-to
z3_include_dir.txt
(bash "opam var conf-z3:includedir | tr -d '\\n'"))))
(rule
(mode promote)
(targets z3.idl)
(deps gen_z3_idl.ml z3_include_dir.txt)
(action
(with-stdout-to
z3.idl
(run ocaml ./gen_z3_idl.ml %{read:z3_include_dir.txt}/z3.h))))
(rule
(mode promote)
(targets z3.ml z3.mli z3_stubs.c)
(deps z3.idl)
(action
(run camlidl -nocpp -remove-prefix z3_ z3.idl)))
(library
(name z3)
(public_name nonstd-z3)
(libraries camlidl)
(foreign_stubs
(language c)
(names z3_stubs)
(flags
:standard
(:include c_flags.sexp)))
(c_library_flags
(:include c_library_flags.sexp)))
(rule
(alias api-coverage)
(deps z3.mli (glob_files test/test_*.ml))
(action
(bash
"patdiff -no-semantic-cleanup \
<(grep '\\(external\\|val\\) ' %{dep:z3.mli} \
| sed -e 's/external \\([^ ]*\\) :.*/Z3.\\1/g' \
| sed -e 's/val \\([^ ]*\\) :.*/Z3.\\1/g' \
| sort -u) \
<(grep -h -o -e 'Z3\\.\\([a-z][0-9A-Za-z_]*\\)' test/*.ml \
| sort -u) \
| { ! grep '\\-|'; }")))