Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (29 sloc) 668 Bytes
REBAR3_URL=https://s3.amazonaws.com/rebar3/rebar3
ifeq ($(wildcard rebar3),rebar3)
REBAR3 = $(CURDIR)/rebar3
endif
REBAR3 ?= $(shell test -e `which rebar3` 2>/dev/null && which rebar3 || echo "./rebar3")
ifeq ($(REBAR3),)
REBAR3 = $(CURDIR)/rebar3
endif
.PHONY: deps escpritize test build
all: build escriptize docs
build: $(REBAR3)
@$(REBAR3) compile
$(REBAR3):
wget $(REBAR3_URL) || curl -Lo rebar3 $(REBAR3_URL)
chmod a+x rebar3
escriptize:
@$(REBAR3) escriptize
deps:
@$(REBAR3) get-deps
clean:
@$(REBAR3) clean
distclean: clean
@$(REBAR3) delete-deps
docs:
@$(REBAR3) edoc
test:
@$(REBAR3) do ct, cover
release: test
@$(REBAR3) release