forked from xapi-project/xapi-storage
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Scott
committed
Sep 27, 2012
1 parent
fccbb08
commit 3858d05
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
.PHONY: all clean install build | ||
all: build test doc | ||
|
||
NAME=xcp-api-client | ||
|
||
LWT ?= $(shell if ocamlfind query lwt.ssl >/dev/null 2>&1; then echo --enable-lwt; fi) | ||
ASYNC ?= $(shell if ocamlfind query async_core >/dev/null 2>&1; then echo --enable-async; fi) | ||
MIRAGE ?= $(shell if ocamlfind query mirage-net >/dev/null 2>&1; then echo --enable-mirage; fi) | ||
ifneq ($(MIRAGE_OS),xen) | ||
TESTS ?= --enable-tests | ||
endif | ||
# disabled by default as they hang at the moment for Async | ||
# NETTESTS ?= --enable-nettests | ||
|
||
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 $(LWT) $(TESTS) $(ASYNC) #$(MIRAGE) $(NETTESTS) | ||
|
||
build: setup.data setup.bin | ||
./setup.bin -build | ||
|
||
doc: setup.data setup.bin | ||
./setup.bin -doc | ||
|
||
install: setup.bin | ||
./setup.bin -install | ||
|
||
test: setup.bin build | ||
./setup.bin -test | ||
|
||
fulltest: setup.bin build | ||
./setup.bin -test | ||
|
||
reinstall: setup.bin | ||
ocamlfind remove $(NAME) || true | ||
./setup.bin -reinstall | ||
|
||
clean: | ||
ocamlbuild -clean | ||
rm -f setup.data setup.log setup.bin |