forked from xapi-project/ocaml-xenstore-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (32 loc) · 800 Bytes
/
Makefile
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
.PHONY: all clean install build
all: build doc
NAME=xenstore
J=4
export OCAMLRUNPARAM=b
TESTS ?= --enable-tests
ifneq "$(MIRAGE_OS)" ""
TESTS := --disable-tests
endif
setup.bin: setup.ml
@ocamlopt.opt -o $@ $< || ocamlopt -o $@ $< || ocamlc -o $@ $<
@rm -f setup.cmx setup.cmi setup.o setup.cmo
setup.data: setup.bin
@./setup.bin -configure $(TESTS)
build: setup.data setup.bin
@./setup.bin -build -j $(J)
doc: setup.data setup.bin
@./setup.bin -doc -j $(J)
install: setup.bin
@./setup.bin -install
# oasis bug?
#test: setup.bin build
# @./setup.bin -test
test:
_build/core_test/xs_test.native
_build/server_test/server_test.native
reinstall: setup.bin
@ocamlfind remove $(NAME) || true
@./setup.bin -reinstall
clean:
@ocamlbuild -clean
@rm -f setup.data setup.log setup.bin