Skip to content

Commit

Permalink
Merge pull request #75 from schutm/master
Browse files Browse the repository at this point in the history
Fix compilation on Windows.
  • Loading branch information
kostis committed Oct 14, 2013
2 parents f7fa99e + 587d0ca commit 7d49075
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
20 changes: 14 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@

.PHONY: default fast all get-deps compile dialyzer check_escripts tests doc clean distclean rebuild retest

ifeq (,$(findstring /Windows/,$(OS)))
SEP := $(strip \)
else
SEP := $(strip /)
endif

REBAR := .$(SEP)rebar

default: fast dialyzer

fast: get-deps compile
Expand All @@ -32,10 +40,10 @@ include/compile_flags.hrl:
./write_compile_flags $@

get-deps:
./rebar get-deps
$(REBAR) get-deps

compile:
./rebar compile
$(REBAR) compile

dialyzer: compile
dialyzer -n -nn -Wunmatched_returns ebin $(find . -path 'deps/*/ebin/*.beam')
Expand All @@ -44,7 +52,7 @@ check_escripts:
./check_escripts.sh make_doc write_compile_flags

tests: compile
./rebar eunit
$(REBAR) eunit

doc:
./make_doc
Expand All @@ -54,11 +62,11 @@ clean:

distclean: clean
rm -f include/compile_flags.hrl
./rebar clean
$(REBAR) clean

rebuild: distclean include/compile_flags.hrl
./rebar compile
$(REBAR) compile

retest: compile
rm -rf .eunit
./rebar eunit
$(REBAR) eunit
7 changes: 7 additions & 0 deletions rebar.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@echo off

setlocal

set rebarscript=%~f0

escript.exe "%rebarscript:.cmd=%" %*

0 comments on commit 7d49075

Please sign in to comment.