-
Notifications
You must be signed in to change notification settings - Fork 167
/
Makefile
87 lines (69 loc) · 2.47 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
83
84
85
86
87
# Copyright 2010-2023 Manolis Papadakis <[email protected]>,
# Eirini Arvaniti <[email protected]>,
# and Kostis Sagonas <[email protected]>
#
# 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
# A safe version of rebar3 that still supports Erlang/OTP 20.x and 21.x
# Upgrade to a newer version when support for these versions is dropped.
REBAR3_URL := https://github.com/erlang/rebar3/releases/download/3.15.2/rebar3
REBAR3 ?= $(shell which rebar3 || which .$(SEP)rebar3 || \
(wget --no-check-certificate $(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 --plt $< -Wunmatched_returns ebin
.plt/proper_plt: .plt
dialyzer --build_plt --output_plt $@ --apps erts kernel stdlib compiler crypto syntax_tools 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
./scripts/clean_doc.sh
$(REBAR3) clean
distclean: clean
$(RM) ebin .plt/proper_plt
$(RM) rebar3 rebar.lock
$(RM) -r _build
rebuild: distclean compile
retest:
$(RM) -r _build/test/lib/proper/test
$(REBAR3) eunit