Permalink
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (20 sloc) 548 Bytes
REBAR3_URL=https://s3.amazonaws.com/rebar3/rebar3
# If there is a rebar in the current directory, use it
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 = $(CURDIR)/rebar3
endif
all: $(REBAR3)
@$(REBAR3) do update, clean, compile, eunit, dialyzer
$(REBAR3):
curl -Lo rebar3 $(REBAR3_URL) || wget $(REBAR3_URL)
chmod a+x rebar3
distclean:
@rm -rf ./_build
edoc:
@$(REBAR3) edoc