Skip to content

Commit

Permalink
Improve Makefile, Rebar is automatically downloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
jimenezrick committed Feb 3, 2012
1 parent 88eeb20 commit 16c7ee5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.*.sw[nop]
.eunit/
rebar
ebin/
doc/
.eunit/
35 changes: 21 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
REBAR := ./rebar
REBAR_URL ?= http://cloud.github.com/downloads/basho/rebar/rebar

.PHONY: all doc clean test dialyzer
ifneq ($(shell which wget 2>/dev/null),)
REBAR_GET ?= wget -q $(REBAR_URL)
else
REBAR_GET ?= curl -s -f $(REBAR_URL) >rebar
endif

.PHONY: all compile doc test dialyzer clean

all: compile doc

compile:
$(REBAR) compile
rebar:
$(REBAR_GET)
chmod +x rebar

doc:
$(REBAR) doc
compile: rebar
./rebar compile

test:
$(REBAR) eunit
doc: rebar
./rebar doc

dialyzer:
$(REBAR) analyze
test: rebar
./rebar eunit

release: all dialyzer test
$(REBAR) release
dialyzer: rebar
./rebar analyze

clean:
$(REBAR) clean
clean: rebar
./rebar clean
Binary file removed rebar
Binary file not shown.

0 comments on commit 16c7ee5

Please sign in to comment.