-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild
executable file
·30 lines (26 loc) · 863 Bytes
/
build
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
#!/bin/sh
# This script is only used for developement. It is removed by the
# distribution process.
set -e
OCAMLBUILD=${OCAMLBUILD:="ocamlbuild -tag debug -classic-display \
-use-ocamlfind -cflags -warn-error,+A" }
action ()
{
case $1 in
default) action lib ;;
lib) $OCAMLBUILD -I src usane.cma usane.cmxa ;;
test) action lib ; $OCAMLBUILD test/test.native ; ./test.native ;;
coverage)
action clean ;
export OCAMLBUILD="$OCAMLBUILD -pkg bisect_ppx" ;
action lib ;
$OCAMLBUILD test/test.native ;
./test.native ;
bisect-ppx-report -I _build/ -html coverage/ bisect0001.out ;;
clean) $OCAMLBUILD -clean ; rm -rf _tests ;;
*) $OCAMLBUILD $* ;;
esac
}
if [ $# -eq 0 ];
then action default ;
else action $*; fi