-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve Makefile, Rebar is automatically downloaded
- Loading branch information
1 parent
88eeb20
commit 16c7ee5
Showing
3 changed files
with
23 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.*.sw[nop] | ||
.eunit/ | ||
rebar | ||
ebin/ | ||
doc/ | ||
.eunit/ |
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
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 |