forked from eproxus/meck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (37 loc) · 1.07 KB
/
Copy pathMakefile
File metadata and controls
53 lines (37 loc) · 1.07 KB
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
PLTFILE=$(CURDIR)/.deps.plt
APP_DEPS=kernel stdlib eunit tools compiler
ERLFLAGS= -pa $(CURDIR)/.eunit -pa $(CURDIR)/ebin -pa $(CURDIR)/deps/*/ebin
REBAR=$(shell which rebar)
ifeq ($(REBAR),)
$(error "Rebar not available on this system")
endif
ERL = $(shell which erl)
ifeq ($(ERL),)
$(error "Erlang must be available on this system")
endif
.PHONY: all rebuild compile doc clean test dialyzer typer \
shell clean-plt clean-doc distclean
all: compile dialyzer test doc
rebuild: clean-doc clean all
compile:
@$(REBAR) skip_deps=true compile
doc:
@$(REBAR) skip_deps=true doc
clean:
@$(REBAR) skip_deps=true clean
test:
@$(REBAR) skip_deps=true eunit
$(PLTFILE):
- dialyzer --build_plt --apps $(APP_DEPS) --output_plt $(PLTFILE)
dialyzer: compile $(PLTFILE)
@dialyzer --fullpath --plt $(PLTFILE) -pa $(CURDIR)/ebin -c src --src | \
fgrep -v -f ./dialyzer.ignore-warnings
typer:
typer --plt $(PLTFILE) -I include -r src
shell:
@$(ERL) $(ERLFLAGS)
clean-plt:
@rm -rf $(PLTFILE)
clean-doc:
@cd doc; ls * | grep -v overview.edoc | xargs rm -f
distclean: clean clean-plt clean-doc