Skip to content

Commit

Permalink
Add rebar binary as a fallback if rebar cannot be found in the system…
Browse files Browse the repository at this point in the history
… path
  • Loading branch information
jcomellas committed May 15, 2012
1 parent 659a28f commit 768d93a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Makefile
@@ -1,5 +1,6 @@
APPLICATION := getopt

REBAR=$(shell which rebar || echo ./rebar)
ERL := erl
EPATH := -pa ebin
TEST_EPATH := -pa .eunit
Expand All @@ -14,10 +15,10 @@ APPS=kernel stdlib
all: compile

compile:
@rebar compile
@$(REBAR) compile

doc:
@rebar doc
@$(REBAR) doc

plt: compile
@$(DIALYZER) --build_plt --output_plt $(PLT_FILE) --apps $(APPS) ebin
Expand All @@ -29,13 +30,13 @@ analyze: compile
@$(DIALYZER) --plt $(PLT_FILE) $(DIALYZER_OPTS) -r ebin

clean:
@rebar clean
@$(REBAR) clean

test:
@rebar eunit
@$(REBAR) eunit

dialyzer:
@rebar analyze
@$(REBAR) analyze

console: compile
$(ERL) -sname $(APPLICATION) $(EPATH)
Expand Down
Binary file added rebar
Binary file not shown.

0 comments on commit 768d93a

Please sign in to comment.