Browse files

Support rebar binary in system

This provides the binary of rebar. However, I think that using the rebar binary
installed in the system in many cases.
By this change, when rebar is already installed in system, this change that rebar
of System use installed. And when not provided, use the binary provide in source.

Signed-off-by: Nobuhiro Iwamatsu <>
  • Loading branch information...
1 parent e6e06f5 commit 3cc4002bb7291e2d717fda9c67e337828cfa196d @iwamatsu iwamatsu committed Aug 2, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 Makefile
10 Makefile
@@ -2,19 +2,23 @@ REPO ?= bitcask
BITCASK_TAG = $(shell git describe --tags)
REVISION ?= $(shell echo $(BITCASK_TAG) | sed -e 's/^$(REPO)-//')
PKG_VERSION ?= $(shell echo $(REVISION) | tr - .)
+REBAR_BIN := $(shell which rebar)
+ifeq ($(REBAR_BIN),)
+REBAR_BIN = ./rebar
.PHONY: rel deps package pkgclean
all: deps compile
- ./rebar compile eunit
+ $(REBAR_BIN) compile eunit
- ./rebar get-deps
+ $(REBAR_BIN) get-deps
- ./rebar clean
+ $(REBAR_BIN) clean
# Release tarball creation
# Generates a tarball that includes all the deps sources so no checkouts are necessary

0 comments on commit 3cc4002

Please sign in to comment.