-
Notifications
You must be signed in to change notification settings - Fork 22
/
build
executable file
·47 lines (43 loc) · 1.3 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/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 \
-plugin-tag package(js_of_ocaml.ocamlbuild)"}
action ()
{
case $1 in
default) action lib;;
lib)
action lib-os
action lib-jsoo
;;
lib-os) $OCAMLBUILD -I src-os mtime.cma mtime.cmxa ;;
lib-jsoo) $OCAMLBUILD -I src-jsoo mtime.cma mtime.cmxa ;;
test)
action test-os
action test-jsoo
;;
test-os)
action lib
$OCAMLBUILD -I src-os test-os/tests.otarget
;;
test-jsoo)
action lib-jsoo
$OCAMLBUILD -I src-jsoo test-jsoo/tests.otarget;
shift;
if [ "$1" = "-b" ]; then
reload-browser \
"http://`hostname`/mtime/test-jsoo/test_jsoo.html"
fi
;;
doc) shift; pkg-doc -I src-os $* doc/dev-api.docdir ;;
api-doc) shift; pkg-doc -I src-os $* doc/api.docdir ;;
clean) $OCAMLBUILD -clean ;;
*) $OCAMLBUILD $* ;;
esac
}
if [ $# -eq 0 ];
then action default ;
else action $*; fi