[erlang-questions] Makefile detecting / downloading rebar
Gleb Peregud
gleber.p@REDACTED
Sun Jul 22 14:32:14 CEST 2012
IMO "best" solution is:
REBAR=$(shell which rebar || echo ./rebar)
REBAR_URL=http://cloud.github.com/downloads/basho/rebar/rebar
all: $(REBAR)
$(REBAR) compile
./rebar:
erl -noshell -s inets -s ssl \
-eval 'httpc:request(get, {"$(REBAR_URL)", []}, [], [{stream, "./rebar"}])' \
-s init stop
chmod +x ./rebar
distclean:
rm -f ./rebar
Thanks Michael!
More information about the erlang-questions
mailing list