forked from benoitc/couchbeam
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
36 lines (25 loc) · 780 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
ERL ?= erl
EBIN_DIRS := $(wildcard deps/*/ebin)
ERLC_FLAGS := -W $(INCLUDE_DIRS:%=-I %) $(EBIN_DIRS:%=-pa %)
APP := couchbeam
all: lhttpc erl ebin/$(APP).app
lhttpc:
@(cd deps/lhttpc;$(MAKE))
erl:
@mkdir -p src/ebin
@$(ERL) -pa $(EBIN_DIRS) -noinput +B \
-eval 'case make:all() of up_to_date -> halt(0); error -> halt(1) end.'
docs:
@mkdir -p doc
@$(ERL) -noshell -run edoc_run application '$(APP)' '"."' '[{preprocess, true},{includes, ["."]}]'
test: all
prove t/*.t
cover: all
COVER=1 prove t/*.t
erl -detached -noshell -eval 'etap_report:create()' -s init stop
clean:
@echo "removing:"
@rm -fv ebin/*.beam ebin/*.app
@rm -fv deps/lhttpc/ebin/*.beam deps/lhttpc/ebin/*.app
ebin/$(APP).app: src/$(APP).app
@cp -v src/$(APP).app $@