-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (35 loc) · 1.7 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
all: get-deps plugins compile
cookie:
@echo Generating a default cookie in /etc/vm.args
@(echo -setcookie `openssl rand -base64 50 | head -n1 | sed -e 's/[^a-zA-Z0-9]//g'` >> etc/vm.args)
compile:
@(export PATH=`pwd`/`echo erts-*/bin`:$$PATH; echo "Using Erlang in `which erl`"; ./rebar compile)
get-deps:
@(export PATH=`pwd`/`echo erts-*/bin`:$$PATH; echo "Using Erlang in `which erl`"; ./rebar get-deps)
update-deps:
@(export PATH=`pwd`/`echo erts-*/bin`:$$PATH; echo "Using Erlang in `which erl`"; ./rebar update-deps)
copy-static:
@(mkdir -p site/static/nitrogen)
@(cp -r lib/nitrogen_core/www/* site/static/nitrogen/)
plugins:
@(export PATH=`pwd`/`echo erts-*/bin`:$$PATH;escript do-plugins.escript)
DEPS_PLT=$(CURDIR)/.deps_plt
DEPS=erts kernel stdlib sasl nitrogen_core simple_bridge sync nprocreg
$(DEPS_PLT):
@echo Building local plt at $(DEPS_PLT)
@echo
@(export PATH=`pwd`/`echo erts-*/bin`:$$PATH; echo "Using Dialyzer in `which dialyzer`"; dialyzer --output_plt $(DEPS_PLT) --build_plt --apps $(DEPS))
dialyzer: all $(DEPS_PLT)
@(export PATH=`pwd`/`echo erts-*/bin`:$$PATH; echo "Using Dialyzer in `which dialyzer`"; dialyzer --fullpath --plt $(DEPS_PLT) -Wrace_conditions -r ./site/ebin)
update: update-deps copy-static compile
@(echo "*** CONGRATULATIONS ***")
@(echo "Your Nitrogen installation has been upgraded.")
@(echo "You may need to manually merge any changes that may have been made to")
@(echo "configuration files as well as the initialization modules:")
@(echo " site/src/nitrogen_sup.erl")
@(echo " site/src/nitrogen_PLATFORM.erl")
@(echo " site/src/nitrogen_app.erl")
@(echo "")
upgrade: update
clean:
@(export PATH=`pwd`/`echo erts-*/bin`:$$PATH; ./rebar clean)