Add rebar binary as a fallback if rebar cannot be found in the system path
This commit is contained in:
parent
659a28f414
commit
768d93a40f
11
Makefile
11
Makefile
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user