forked from proper-testing/proper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
82 lines (64 loc) · 2.25 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
80
81
82
# Copyright 2010-2021 Manolis Papadakis <manopapad@gmail.com>,
# Eirini Arvaniti <eirinibob@gmail.com>
# and Kostis Sagonas <kostis@cs.ntua.gr>
#
# This file is part of PropEr.
#
# PropEr is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# PropEr is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with PropEr. If not, see <http://www.gnu.org/licenses/>.
# Author(s): Manolis Papadakis and Kostis Sagonas
# Description: Instructions for make
.PHONY: default all compile dialyzer check_escripts test test-examples test-parallel doc clean distclean rebuild retest
ifneq (,$(findstring Windows,$(OS)))
SEP := $(strip \)
else
SEP := $(strip /)
endif
REBAR3_URL := https://s3.amazonaws.com/rebar3/rebar3
REBAR3 ?= $(shell which rebar3 || which .$(SEP)rebar3 || \
(wget $(REBAR3_URL) && chmod +x rebar3 && echo .$(SEP)rebar3))
COVER ?= false
default: compile
all: compile dialyzer doc test #test-examples -- this is another GitHub action
compile:
$(RM) ebin
$(REBAR3) compile
ln -s _build/default/lib/proper/ebin .
dialyzer: .plt/proper_plt compile
dialyzer -nn --plt $< -Wunmatched_returns ebin
.plt/proper_plt: .plt
dialyzer --build_plt --output_plt $@ --apps erts kernel stdlib compiler crypto syntax_tools eunit mnesia tools runtime_tools
check_escripts:
./scripts/check_escripts.sh make_doc
test: compile
ifeq ($(COVER), true)
$(REBAR3) do eunit -c, cover, covertool generate
else
$(REBAR3) eunit
endif
test-examples:
$(REBAR3) eunit --dir=examples --verbose
test-parallel:
NUMWORKERS=2 $(REBAR3) eunit --dir=examples --verbose
doc: compile
./scripts/make_doc
clean:
./scripts/clean_temp.sh
distclean: clean
$(REBAR3) clean
$(RM) .plt/proper_plt
$(RM) -r _build ebin rebar3 rebar.lock
rebuild: distclean compile
retest:
$(RM) -r _build/test/lib/proper/test
$(REBAR3) eunit