Browse Source

Don't assume that . is in path

Daniel Luna 12 years ago
parent
commit
81156a4a3c
1 changed files with 6 additions and 5 deletions
  1. 6 5
      Makefile

+ 6 - 5
Makefile

@@ -19,6 +19,7 @@
 ## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 ## FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 ## DEALINGS IN THE SOFTWARE.
+REBAR=$(shell which rebar || echo ./rebar)
 
 .PHONY: all compile clean eunit test eqc doc check dialyzer
 
@@ -29,19 +30,19 @@ all: compile
 check: compile dialyzer
 
 compile:
-	rebar compile
+	$(REBAR) compile
 
 
 clean:
-	rebar clean
+	$(REBAR) clean
 
 eunit:
-	rebar eunit
+	$(REBAR) eunit
 
 test: eunit
 
 doc:
-	rebar doc
+	$(REBAR) doc
 
 dialyzer:
-	rebar skip_deps=true dialyze
+	$(REBAR) skip_deps=true dialyze