forked from chef/mini_s3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (40 loc) · 846 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
53
#
# Simple Makefile for rebar3 based erlang project
#
#
# Use rebar3 from either:
# - ./rebar3
# - rebar3 on the PATH (found via which)
# - Downloaded from $REBAR3_URL
#
REBAR3_URL=https://s3.amazonaws.com/rebar3/rebar3
ifeq ($(wildcard rebar3),rebar3)
REBAR3 = $(CURDIR)/rebar3
endif
# Fallback to rebar on PATH
REBAR3 ?= $(shell which rebar3)
# And finally, prep to download rebar if all else fails
ifeq ($(REBAR3),)
REBAR3 = ./rebar3
endif
all: $(REBAR3)
@$(REBAR3) do clean, compile, eunit, dialyzer
rel: all
@$(REBAR3) release
test:
@$(REBAR3) eunit ct
dialyzer:
@$(REBAR3) dialyzer
xref:
@$(REBAR3) xref
update:
@$(REBAR3) update
install: $(REBAR3) distclean update
distclean:
@rm -rf _build
$(REBAR3):
curl -Lo rebar3 $(REBAR3_URL) || wget $(REBAR3_URL)
chmod a+x rebar3
travis: all
@echo "Travis'd!"
.PHONY: test