Merge pull request #57 from ConnorRigby/rebar3-update
Update Makefile to use `rebar3` instead of `rebar`
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
.rebar
|
.rebar
|
||||||
rebar
|
.rebar3
|
||||||
|
rebar3
|
||||||
ebin
|
ebin
|
||||||
priv
|
priv
|
||||||
.eunit/*
|
.eunit/*
|
||||||
@@ -8,3 +9,4 @@ priv
|
|||||||
*~
|
*~
|
||||||
_build
|
_build
|
||||||
c_src/**/*.d
|
c_src/**/*.d
|
||||||
|
erl_crash.dump
|
||||||
|
|||||||
31
Makefile
31
Makefile
@@ -1,34 +1,33 @@
|
|||||||
PROJECT = esqlite
|
PROJECT = esqlite
|
||||||
DIALYZER = dialyzer
|
DIALYZER = dialyzer
|
||||||
|
|
||||||
REBAR := $(shell which rebar 2>/dev/null || echo ./rebar)
|
REBAR3 := $(shell which rebar3 2>/dev/null || echo ./rebar3)
|
||||||
REBAR_URL := https://github.com/downloads/basho/rebar/rebar
|
REBAR3_VERSION := 3.10.0
|
||||||
|
REBAR3_URL := https://github.com/erlang/rebar3/releases/download/$(REBAR3_VERSION)/rebar3
|
||||||
|
|
||||||
all: compile
|
all: compile
|
||||||
|
|
||||||
./rebar:
|
./rebar3:
|
||||||
erl -noshell -s inets start -s ssl start \
|
wget $(REBAR3_URL)
|
||||||
-eval '{ok, saved_to_file} = httpc:request(get, {"$(REBAR_URL)", []}, [], [{stream, "./rebar"}])' \
|
chmod +x ./rebar3
|
||||||
-s inets stop -s init stop
|
|
||||||
chmod +x ./rebar
|
|
||||||
|
|
||||||
compile: rebar
|
compile: rebar3
|
||||||
$(REBAR) compile
|
$(REBAR3) compile
|
||||||
|
|
||||||
test: compile
|
test: compile
|
||||||
$(REBAR) eunit
|
$(REBAR3) eunit
|
||||||
|
|
||||||
clean: rebar
|
clean: rebar3
|
||||||
$(REBAR) clean
|
$(REBAR3) clean
|
||||||
|
|
||||||
distclean:
|
distclean:
|
||||||
rm $(REBAR)
|
rm $(REBAR3)
|
||||||
|
|
||||||
# dializer
|
# dializer
|
||||||
|
|
||||||
build-plt:
|
build-plt:
|
||||||
@$(DIALYZER) --build_plt --output_plt .$(PROJECT).plt \
|
@$(DIALYZER) --build_plt --output_plt .$(PROJECT).plt \
|
||||||
--apps kernel stdlib
|
--apps kernel stdlib
|
||||||
|
|
||||||
dialyze:
|
dialyze:
|
||||||
@$(DIALYZER) --src src --plt .$(PROJECT).plt --no_native \
|
@$(DIALYZER) --src src --plt .$(PROJECT).plt --no_native \
|
||||||
|
|||||||
Reference in New Issue
Block a user