-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathMakefile
More file actions
90 lines (70 loc) · 2.29 KB
/
Copy pathMakefile
File metadata and controls
90 lines (70 loc) · 2.29 KB
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
88
89
90
JS_PRIV=apps/xprof_gui/priv
BIN_DIR:=node_modules/.bin
REBAR3?=$(shell which rebar3 || echo ./rebar3)
# this will update cowboy version based on rebar.config overwriting the lock file
ifdef COWBOY_VERSION
MAYBE_UPDATE_COWBOY = $(REBAR3) upgrade cowboy
endif
ifdef XPROF_ERL_HIST
MAYBE_UNLOCK_HIST = $(REBAR3) unlock hdr_histogram
endif
compile:
$(MAYBE_UPDATE_COWBOY)
$(MAYBE_UNLOCK_HIST)
$(REBAR3) compile
dev: dev_front_end dev_back_end
dev_back_end:
$(MAYBE_UPDATE_COWBOY)
$(MAYBE_UNLOCK_HIST)
$(REBAR3) as dev compile, shell
dev_front_end:
cd $(JS_PRIV); npm run start:with-cowboy &
npm:
cd $(JS_PRIV); npm install
bootstrap_front_end: npm
test_front_end:
cd $(JS_PRIV); npm run test:single-run
build_prod_front_end:
cd $(JS_PRIV); npm run build
test: compile
$(MAYBE_UPDATE_COWBOY)
$(MAYBE_UNLOCK_HIST)
$(REBAR3) as test do cover --reset, eunit -c, ct -c, cover --verbose
test_jiffy:
$(MAYBE_UPDATE_COWBOY)
$(MAYBE_UNLOCK_HIST)
export XPROF_JSON_LIB=jiffy; \
$(REBAR3) as test_jiffy do compile, dialyzer, cover --reset, ct -c, cover --verbose
test_jsx:
$(MAYBE_UPDATE_COWBOY)
$(MAYBE_UNLOCK_HIST)
export XPROF_JSON_LIB=jsx; \
$(REBAR3) as test_jsx do compile, dialyzer, cover --reset, ct -c, cover --verbose
test_thoas:
$(MAYBE_UPDATE_COWBOY)
$(MAYBE_UNLOCK_HIST)
export XPROF_JSON_LIB=thoas; \
$(REBAR3) as test_thoas do compile, dialyzer, cover --reset, ct -c, cover --verbose
doc:
$(REBAR3) edoc
./doc/src/readme.md: README.md
sed -e 's|(doc/src/querysyntax.md)|(querysyntax.html)|' \
-e 's|doc/assets/|assets/|' \
-e '1 s|\[!\[.*||' README.md > ./doc/src/readme.md
gen_ex_doc: ./doc/src/readme.md
$(MAYBE_UPDATE_COWBOY)
$(MAYBE_UNLOCK_HIST)
$(REBAR3) as docs ex_doc --app xprof_core
$(REBAR3) as docs ex_doc --app xprof_gui
cp _build/docs/lib/xprof_core/ebin/xprof_core.beam _build/docs/lib/xprof/ebin
cp _build/docs/lib/xprof_gui/ebin/xprof_gui_rest.beam _build/docs/lib/xprof/ebin
$(REBAR3) as docs ex_doc --app xprof
dialyzer:
$(MAYBE_UPDATE_COWBOY)
$(MAYBE_UNLOCK_HIST)
$(REBAR3) dialyzer
publish:
$(REBAR3) as publish hex publish --deps_from_config
publish_docs: gen_ex_doc
$(REBAR3) as publish hex docs
.PHONY: compile dev dev_back_end dev_front_end npm bootstrap_front_end test_front_end build_prod_front_end test doc gen_ex_doc dialyzer publish publish_docs