-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
53 lines (39 loc) · 1.02 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
.PHONY: test
all: rebar3 compile
# Check if rebar3.mk exists, and if not, download it
ifeq ("$(wildcard rebar3.mk)","")
$(shell curl -O https://raw.githubusercontent.com/choptastic/rebar3.mk/master/rebar3.mk)
endif
# rebar3.mk adds a new rebar3 rule to your Makefile
# (see https://github.com/choptastic/rebar3.mk) for full info
include rebar3.mk
CWD=$(shell pwd)
NAME=$(shell basename ${CWD})
CT_LOG=${APP_DIR}/logs
REBAR?=${CWD}/rebar3
COOKIE?=cookie_${NAME}
ERL?=/usr/bin/env erl
ERLARGS=-pa ebin -smp enable -name ${NODE} \
-setcookie ${COOKIE} -boot start_sasl
# Clean all.
clean: rebar3
@${REBAR} clean
# Gets dependencies.
get-deps: rebar3
@${REBAR} get-deps
# Compiles.
compile: rebar3
@${REBAR} compile
run: rebar3
$(REBAR) shell
test: rebar3
$(REBAR) ct
#benchmark:
# ${ERL} ${ERLARGS} +P 60000000 -eval "application:start(nitro_cache)" -eval "nitro_cache:benchmark(1000)"
# This one runs without a release.
shell: compile
${ERL} ${ERLARGS}
dialyzer: rebar3
$(REBAR) dialyzer
publish:
$(REBAR) hex publish