[erlang-questions] Makefile detecting / downloading rebar

Gleb Peregud gleber.p@REDACTED
Sun Jul 22 13:08:15 CEST 2012


Hello all

Just an idea. Do you think this is a good approach to put the
following into a makefile of an open source library?

all: rebar
	./rebar compile

rebar:
	which rebar && ln -sf `which rebar` || true
	test -x ./rebar || (wget
http://cloud.github.com/downloads/basho/rebar/rebar && chmod u+x
rebar)

This allows user who has rebar installed globally to still use it, but
for users who prefer local rebar binaries to download it
automatically. Can this script be improved?

Cheers,
Gleb



More information about the erlang-questions mailing list