-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
57 lines (39 loc) · 1.05 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
BASE_DIR = $(shell pwd)
SUPPORT_DIR=$(BASE_DIR)/support
ERLC ?= $(shell which erlc)
ESCRIPT ?= $(shell which escript)
ERL ?= $(shell which erl)
APP := cowdb
REBAR ?= $(shell which rebar)
.PHONY: deps
$(if $(REBAR),,$(warning "Warning: rebar not found in your path"))
$(if $(ERLC),,$(warning "Warning: No Erlang found in your path, this will probably not work"))
$(if $(ESCRIPT),,$(warning "Warning: No escript found in your path, this will probably not work"))
.PHONY: deps doc test
all: deps compile
dev: devbuild
compile:
@$(REBAR) compile
deps:
@$(REBAR) get-deps
doc: dev
$(REBAR) -C rebar_dev.config doc skip_deps=true
test: dev
$(REBAR) -C rebar_dev.config eunit skip_deps=true
clean:
@$(REBAR) clean
@rm -f t/*.beam t/temp.*
@rm -f doc/*.html doc/*.css doc/edoc-info doc/*.png
distclean: clean
@$(REBAR) delete-deps
@rm -rf deps
dialyzer: compile
@dialyzer -Wno_return -c ebin
# development
#
devclean:
$(REBAR) -C rebar_dev.config clean
devbuild: devdeps
$(REBAR) -C rebar_dev.config compile
devdeps:
$(REBAR) -C rebar_dev.config get-deps