Add rebar binary as a fallback if rebar cannot be found in the system path

This commit is contained in:
Juan Jose Comellas 2012-05-15 17:01:42 -03:00
parent 659a28f414
commit 768d93a40f
2 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,6 @@
APPLICATION := getopt APPLICATION := getopt
REBAR=$(shell which rebar || echo ./rebar)
ERL := erl ERL := erl
EPATH := -pa ebin EPATH := -pa ebin
TEST_EPATH := -pa .eunit TEST_EPATH := -pa .eunit
@ -14,10 +15,10 @@ APPS=kernel stdlib
all: compile all: compile
compile: compile:
@rebar compile @$(REBAR) compile
doc: doc:
@rebar doc @$(REBAR) doc
plt: compile plt: compile
@$(DIALYZER) --build_plt --output_plt $(PLT_FILE) --apps $(APPS) ebin @$(DIALYZER) --build_plt --output_plt $(PLT_FILE) --apps $(APPS) ebin
@ -29,13 +30,13 @@ analyze: compile
@$(DIALYZER) --plt $(PLT_FILE) $(DIALYZER_OPTS) -r ebin @$(DIALYZER) --plt $(PLT_FILE) $(DIALYZER_OPTS) -r ebin
clean: clean:
@rebar clean @$(REBAR) clean
test: test:
@rebar eunit @$(REBAR) eunit
dialyzer: dialyzer:
@rebar analyze @$(REBAR) analyze
console: compile console: compile
$(ERL) -sname $(APPLICATION) $(EPATH) $(ERL) -sname $(APPLICATION) $(EPATH)

BIN
rebar vendored Executable file

Binary file not shown.