forked from msantos/procket
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
47 lines (33 loc) · 1003 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
46
47
REBAR = $(shell test -e `which rebar` 2>/dev/null && which rebar || echo "./rebar")
DEPSOLVER_PLT=$(CURDIR)/.depsolver_plt
all: dirs compile
./rebar:
erl -noshell -s inets start -s ssl start \
-eval 'httpc:request(get, {"https://raw.github.com/wiki/rebar/rebar/rebar", []}, [], [{stream, "./rebar"}])' \
-s inets stop -s init stop
chmod +x ./rebar
dirs:
-@mkdir -p priv/tmp
compile: $(REBAR)
@$(REBAR) compile
clean: $(REBAR)
@$(REBAR) clean
deps: $(REBAR)
@$(REBAR) get-deps
examples: eg
eg:
@erlc -I deps -o ebin examples/*.erl
setuid: all
sudo chown root priv/procket
sudo chmod 4750 priv/procket
.PHONY: dialyzer typer clean distclean
$(DEPSOLVER_PLT):
@dialyzer --output_plt $(DEPSOLVER_PLT) --build_plt \
--apps erts kernel stdlib crypto
dialyzer: $(DEPSOLVER_PLT)
@dialyzer --plt $(DEPSOLVER_PLT) -Wrace_conditions --src src
typer: $(DEPSOLVER_PLT)
@typer -I include --plt $(DEPSOLVER_PLT) -r ./src
distclean: clean
@rm $(DEPSOLVER_PLT)
print-%: ; @echo $*=$($*)