Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 39 lines (28 sloc) 1.007 kb
f2e2dc5 @dizzyd Introduce rebar.mk in lieu of embedded rebar; see 'make rebar-info'
dizzyd authored
1
2 REBAR_URL ?= http://github.com/downloads/basho/rebar/rebar
3
4 REBAR_GLOBAL ?= $(shell which rebar)
5 REBAR_LOCAL ?= $(shell which ./rebar)
6 REBAR_TARGET ?= $(dir $(shell which escript))
7
8 ifneq ($(strip $(REBAR_LOCAL)), )
9 REBAR ?= $(REBAR_LOCAL)
10 else ifneq ($(strip $(REBAR_GLOBAL)), )
11 REBAR ?= $(REBAR_GLOBAL)
12 else
13 REBAR ?= rebar
14 $(warning Rebar not installed or available. Try 'make rebar-info')
15 endif
16
17 ifneq ($(strip $(shell which wget)), )
8c727fb @dizzyd Update rebar.mk
dizzyd authored
18 REBAR_FETCH ?= wget --no-check-certificate -q -O - $(REBAR_URL)
f2e2dc5 @dizzyd Introduce rebar.mk in lieu of embedded rebar; see 'make rebar-info'
dizzyd authored
19 else
8c727fb @dizzyd Update rebar.mk
dizzyd authored
20 REBAR_FETCH ?= curl -s -f $(REBAR_URL)
f2e2dc5 @dizzyd Introduce rebar.mk in lieu of embedded rebar; see 'make rebar-info'
dizzyd authored
21 endif
22
23
24 rebar-info:
25 @echo "Rebar needs to be either on your path or present in the current" \
26 "working directory:\n" \
27 "* 'make rebar-install' will download and install it into your Erlang path (RECOMMENDED)\n" \
28 "* 'make rebar-get' will download it to your current working directory\n" \
29
30
31 rebar-install:
32 $(REBAR_FETCH) > $(REBAR_TARGET)/rebar
33 chmod a+x $(REBAR_TARGET)/rebar
34
35 rebar-get:
36 $(REBAR_FETCH) > ./rebar
37 chmod u+x ./rebar
38
Something went wrong with that request. Please try again.