Skip to content
Browse files

rebarized Makefile

  • Loading branch information...
1 parent 2ac94d1 commit 53202f00a8414f2dd014bcaae046fd5dbf6f6e5e @si14 si14 committed Oct 30, 2011
Showing with 28 additions and 4 deletions.
  1. +28 −4 Makefile
View
32 Makefile
@@ -4,12 +4,36 @@ PROJECTVERSION=1.0
INSTALLDIR=$(prefix)/$(LIBDIR)/$(PROJECTNAME)-$(PROJECTVERSION)/ebin
LIBDIR=$(shell erl -eval 'io:format("~s~n", [code:lib_dir()])' -s init stop -noshell)
-all:
- mkdir -p ebin
- for srcfile in src/*.erl; do erlc -o ebin $$srcfile; done
+REBAR = rebar
+
+all: app
+
+app: deps
+ @$(REBAR) compile
+
+deps:
+ @$(REBAR) get-deps
clean:
- rm -rf ebin
+ @$(REBAR) clean
+ rm -f erl_crash.dump
+ rm -rf .eunit
+
+tests: clean app eunit
+
+eunit:
+ @$(REBAR) eunit skip_deps=true
+
+build-plt:
+ @$(DIALYZER) --build_plt \
+ --apps kernel stdlib sasl inets crypto public_key ssl wx mnesia
+
+dialyze:
+ @$(DIALYZER) -r ebin \
+ -Werror_handling -Wrace_conditions -Wunmatched_returns -Wunderspecs
+
+docs:
+ @$(REBAR) doc
install:
mkdir -p $(INSTALLDIR)

0 comments on commit 53202f0

Please sign in to comment.
Something went wrong with that request. Please try again.