forked from lasp-lang/lasp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
79 lines (57 loc) · 1.3 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
PACKAGE ?= lasp
VERSION ?= $(shell git describe --tags)
BASE_DIR = $(shell pwd)
ERLANG_BIN = $(shell dirname $(shell which erl))
REBAR = $(shell pwd)/rebar3
.PHONY: rel deps test eqc
all: compile
##
## Compilation targets
##
compile:
$(REBAR) compile
clean: packageclean
$(REBAR) clean
packageclean:
rm -fr *.deb
rm -fr *.tar.gz
##
## Test targets
##
check: test xref dialyzer lint
test: ct eunit
lint:
./rebar3 as lint lint
eqc:
./rebar3 as test eqc
eunit:
./rebar3 as test eunit
ct:
./rebar3 as test ct
##
## Release targets
##
rel:
./rebar3 release
stage:
./rebar3 release -d
##
## Packaging targets
##
package: rel
fpm -s dir -t deb -n $(PACKAGE) -v $(VERSION) \
--deb-user $(PACKAGE) \
--deb-group $(PACKAGE) \
--before-install=rel/before-install \
_build/default/rel/$(PACKAGE)=/opt/ \
rel/init=/etc/init.d/$(PACKAGE) \
rel/var/lib/$(PACKAGE)/=/var/lib/$(PACKAGE)/ \
rel/var/log/$(PACKAGE)/=/var/log/$(PACKAGE)/ \
rel/etc/$(PACKAGE)/$(PACKAGE).config=/etc/$(PACKAGE)/$(PACKAGE).config \
rel/etc/default/$(PACKAGE)=/etc/default/$(PACKAGE)
cut:
./rebar3 as package hex cut
publish:
./rebar3 as package hex publish
DIALYZER_APPS = kernel stdlib erts sasl eunit syntax_tools compiler crypto
include tools.mk