-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
51 lines (34 loc) · 1021 Bytes
/
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
.PHONY: all deps run
PROJECT = erws
# Options.
# Dependencies.
# Standard targets.
all:: deps # priv/erws.boot
rebar3 compile
release: deps
APP_ROOT=var rebar3 release
deps: priv/erlb.js
rebar3 get-deps
# Also dialyze the tests.
# DIALYZER_OPTS += --src -r test
clean::
rm -fr ebin log priv/erlb.js priv/erws.{rel,script,boot} erl_crash.dump
dist-clean distclean:
rm -fr deps priv/erlb.js priv/release.es priv/erws.{rel,script,boot} \
.erlang.mk.packages* .rebar _build
priv/erws.boot: priv/erws.rel
erlc $(LIB_ARGS) -o $(@D) $<
priv/erws.rel: src/erws.rel priv/release.es
escript priv/release.es $< $@
priv/release.es:
wget -q -O - https://raw.github.com/saleyn/util/master/bin/release.es | \
awk '/^%%!/ { print "%%! $(LIB_ARGS)" } !/^%%!/ {print}' > $@
priv/erlb.js:
wget -O $@ -q https://raw.github.com/saleyn/erlb.js/master/erlb.js
src/erws.rel:
relx --verbose=0
cp _rel/releases/1.0/erws.rel $@
rm -fr _rel
run:
@#erl $(LIB_ARGS) -boot priv/erws
APP_ROOT=var rebar3 shell