Created
April 25, 2016 12:23
-
-
Save psyeugenic/d2d53a15463b218fd20c2fe7fd73ced0 to your computer and use it in GitHub Desktop.
Rebar3 Makefile for all projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 test build | |
all: build test docs | |
build: $(REBAR3) | |
@$(REBAR3) compile | |
$(REBAR3): | |
wget $(REBAR3_URL) || curl -Lo rebar3 $(REBAR3_URL) | |
@chmod a+x rebar3 | |
deps: | |
@$(REBAR3) get-deps | |
clean: | |
@$(REBAR3) clean | |
distclean: clean | |
@$(REBAR3) delete-deps | |
docs: | |
@$(REBAR3) edoc | |
test: | |
@$(REBAR3) do ct, cover | |
release: test | |
@$(REBAR3) release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment