-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild
executable file
·44 lines (39 loc) · 1.43 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
#!/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 jsonm jsoo ;;
doc) shift; export OCAMLBUILD;
pkg-doc $* -I src-jsonm -I src-jsoo doc/dev-api.docdir ;;
api-doc) shift; export OCAMLBUILD;
pkg-doc $* -I src-jsonm -I src-jsoo doc/api.docdir ;;
jsonm) $OCAMLBUILD -I src-jsonm \
jsonc_jsonm.cma jsonc_jsonm.cmxa
;;
jsoo)
$OCAMLBUILD -I src-jsoo \
jsonc_jsoo.cma jsonc_jsoo.cmxa
;;
test-jsonm) $OCAMLBUILD -I src-jsonm -I test-jsonm \
test-jsonm.otarget
;;
test-jsoo) $OCAMLBUILD -I src-jsoo -I test-jsoo \
test-jsoo.otarget
;;
browser) action test-jsoo
shift
reload-browser "http://`hostname`/jsonc/test-jsoo/$1.html"
;;
clean) $OCAMLBUILD -clean ;;
*) $OCAMLBUILD $* ;;
esac
}
if [ $# -eq 0 ];
then action default ;
else action $*; fi