Permalink
Browse files

generate rebar instead of including in projects - resolves refuge issue

  • Loading branch information...
1 parent 038e149 commit ded255a8f2c9df2eddf8e797cccd43a28d41a508 fairwinds committed May 24, 2012
Showing with 20 additions and 8 deletions.
  1. +20 −8 Makefile
  2. BIN rebar
View
@@ -5,18 +5,33 @@ REVISION?= $(shell echo $(RCOUCH_TAG) | sed -e 's/^$(REPO)-//')
PKG_VERSION?= $(shell echo $(REVISION) | tr - .)
WITHOUT_CURL?=1
REBAR?=./rebar
+REBAR_DIR=support
+REBAR_MASTER=git://github.com/basho/rebar.git
DESTDIR?=
-DISTDIR= rel/archive
+DISTDIR=rel/archive
-.PHONY: rel deps
+
+.PHONY: rebar rel deps
all: deps compile
-compile:
+bootstrap = if [ ! -d $(REBAR_DIR) ]; then \
+ mkdir $(REBAR_DIR) && \
+ git clone $(REBAR_MASTER) $(REBAR_DIR)/rebar && \
+ cd $(REBAR_DIR)/rebar && \
+ ./bootstrap && \
+ mv rebar ../../ && \
+ cd ../../; \
+ fi
+
+rebar:
+ @$(call bootstrap) > /dev/null
+
+compile: rebar
@WITHOUT_CURL=$(WITHOUT_CURL) $(REBAR) compile
-deps:
+deps: rebar
@$(REBAR) get-deps
clean:
@@ -31,9 +46,7 @@ rel: relclean deps
relclean:
@rm -rf rel/rcouch
-##
-## release tarbals
-##
+## release tarballs
archive = git archive --format=tar --prefix=$(1)/ HEAD | (cd $(2) && tar xf -)
@@ -85,4 +98,3 @@ rcouchxdmg: dist
.PHONY: package
export PKG_VERSION REPO REVISION RCOUCH_TAG
-
View
BIN rebar
Binary file not shown.

0 comments on commit ded255a

Please sign in to comment.