-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMakefile
81 lines (55 loc) · 1.63 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
BASEDIR = $(shell pwd)
SUPPORTDIR = $(BASEDIR)/support
REBAR ?= $(SUPPORTDIR)/rebar3
OTP_VERSION?=19.3
BUILD_NAME?=dirty-1
KERL_DEFAULT_INSTALL_DIR?=$(HOME)/.kerl/local/$(BUILD_NAME)/otp
KERL_CONFIGURE_OPTIONS?=" --disable-hipe --enable-smp-support --enable-threads --enable-kernel-poll --with-wx --without-odbc --enable-dirty-schedulers"
.PHONY: help all rel tar store apply eqc
all: compile
compile:
@$(REBAR) compile
## Create a barrel release
rel:
@$(REBAR) as prod release
devrel: ## Create a barrel release
@$(REBAR) release
tar: ## Create a tar file containing a portable release
@$(REBAR) as prod tar
clean:
@$(REBAR) clean
distclean: clean ## Clean all build and releases artifacts
rm -rf _build
cleantest:
@rm -rf _build/test
erlclean:
kerl delete build $(BUILD_NAME)
build_erlang:
KERL_CONFIGURE_OPTIONS=$(KERL_CONFIGURE_OPTIONS) \
KERL_DEFAULT_INSTALL_DIR=$(KERL_DEFAULT_INSTALL_DIR) \
kerl build $(OTP_VERSION) $(BUILD_NAME)
install_erlang: build_erlang
kerl install $(BUILD_NAME) $(KERL_DEFAULT_INSTALL_DIR)
. $(KERL_DEFAULT_INSTALL_DIR)/activate
shell:
@$(REBAR) shell --sname barrel@localhost
activate:
. $(KERL_DEFAULT_INSTALL_DIR)/activate
dialyzer:
@$(REBAR) dialyzer
test: cleantest dialyzer eunit ct
eunit:
@$(REBAR) eunit
ct:
@$(REBAR) ct
eqc:
@$(REBAR) as eqc eqc
cover:
@$(REBAR) cover
help: ## This documentation
@echo Build commands for barrel platform:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@echo
@echo Default command is \'compile\'
@echo Consult README.md for more information.