Rebar downloading via inets & bumbped otp vsn requirements

This commit is contained in:
Maas-Maarten Zeeman
2013-02-09 10:13:00 +01:00
parent 7fa56acf34
commit 07ca5dd788
2 changed files with 13 additions and 5 deletions

View File

@@ -1,12 +1,20 @@
PROJECT = esqlite
REBAR = ./rebar
DIALYZER = dialyzer
REBAR := $(shell which rebar 2>/dev/null || echo ./rebar)
REBAR_URL := https://github.com/downloads/basho/rebar/rebar
all: compile
rebar:
wget https://github.com/downloads/basho/rebar/rebar -O $(REBAR)
chmod u+x $(REBAR)
#rebar:
# wget https://github.com/downloads/basho/rebar/rebar -O $(REBAR)
# chmod u+x $(REBAR)
./rebar:
erl -noshell -s inets start -s ssl start \
-eval '{ok, saved_to_file} = httpc:request(get, {"$(REBAR_URL)", []}, [], [{stream, "./rebar"}])' \
-s inets stop -s init stop
chmod +x ./rebar
compile: rebar
$(REBAR) compile

View File

@@ -1,3 +1,3 @@
{require_otp_vsn, "R14"}.
{require_otp_vsn, "R14|R15|R16"}.
{port_env, [{"CFLAGS", "$CFLAGS -DSQLITE_THREADSAFE=1 -DSQLITE_USE_URI -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS"}]}.
{port_specs, [{"priv/esqlite3_nif.so", ["c_src/*.c"]}]}.