Skip to content
Browse files

Add rebar.config script (still wip)

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
  • Loading branch information...
1 parent fc375ff commit ab06095d3366a5b22d174eb9ba07103184d75f8a @lemenkov lemenkov committed Jan 17, 2011
Showing with 26 additions and 11 deletions.
  1. +18 −11 Makefile
  2. +8 −0 rebar.config
View
29 Makefile
@@ -1,20 +1,27 @@
-all: ebin/
- (cd src;$(MAKE) all)
+REBAR ?= /usr/bin/rebar
+REBAR_FLAGS ?=
-edoc:
- (cd src;$(MAKE) edoc)
+all:
+ $(REBAR) compile $(REBAR_FLAGS)
-test: ebin/
- (cd src;$(MAKE) test)
+doc:
+ $(REBAR) doc $(REBAR_FLAGS)
+
+test:
+ $(REBAR) eunit $(REBAR_FLAGS)
clean:
- (cd src;$(MAKE) clean)
+ $(REBAR) clean $(REBAR_FLAGS)
clean_plt:
- (cd src;$(MAKE) clean_plt)
+ @rm -f _test/dialyzer_plt
+
+build_plt: build-plt
+
+build-plt:
+ @ [ -d _test ] || mkdir _test
+ $(REBAR) build-plt $(REBAR_FLAGS)
dialyzer:
- (cd src;$(MAKE) dialyzer)
+ $(REBAR) dialyze $(REBAR_FLAGS)
-ebin/:
- @mkdir -p ebin
View
8 rebar.config
@@ -0,0 +1,8 @@
+% -*- mode: erlang -*-
+%{compile_pre_script, "./support/make_tz.py < ./src/timezone.txt > ./src/egeoip_tz.erl"}.
+{clean_files, ["ebin/*.beam", "ebin/egeoip.app", "doc/"]}.
+{erl_opts, [debug_info]}.
+{cover_enabled, true}.
+{cover_print_enabled, true}.
+{eunit_opts, [verbose, {report,{eunit_surefire,[{dir,"."}]}}]}.
+{dialyzer_opts, [{plt, "_test/dialyzer_plt"}, src]}.

0 comments on commit ab06095

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