forked from greenelephantlabs/kha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (37 loc) · 804 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
52
REBAR=$(shell which rebar || echo ./rebar)
default: normal
all: $(REBAR)
$(REBAR) get-deps
$(REBAR) compile
normal:
$(REBAR) compile
fast:
$(REBAR) compile skip_deps=true
clean: $(REBAR)
$(REBAR) clean
make distclean
tests: $(REBAR)
$(REBAR) eunit
sh:
erl -pa ebin/ deps/*/ebin/
ALL= priv/coffee/app.js \
priv/models/build.js \
priv/controllers/builds_controller.js
%.js: %.coffee
@coffee -c $<
priv/js/kha.js: $(ALL)
cat $^ > $@
# Detect or download rebar
REBAR_URL=http://cloud.github.com/downloads/basho/rebar/rebar
./rebar:
erl -noshell -s inets -s ssl \
-eval 'httpc:request(get, {"$(REBAR_URL)", []}, [], [{stream, "./rebar"}])' \
-s init stop
chmod +x ./rebar
distclean:
rm -f ./rebar
# For update code
up:
git fetch
git checkout origin/master
make all