aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile42
1 files changed, 30 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 2f7da14..1d9bfd7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,41 +1,59 @@
# See LICENSE for licensing information.
+PROJECT = cowboy
+
DIALYZER = dialyzer
REBAR = rebar
all: app
-app: deps
- @$(REBAR) compile
+# Application.
deps:
@$(REBAR) get-deps
+app: deps
+ @$(REBAR) compile
+
clean:
@$(REBAR) clean
rm -f test/*.beam
rm -f erl_crash.dump
-tests: clean app eunit ct
+docs: clean-docs
+ @$(REBAR) doc skip_deps=true
+
+clean-docs:
+ rm -f doc/*.css
+ rm -f doc/*.html
+ rm -f doc/*.png
+ rm -f doc/edoc-info
+
+# Tests.
+
+deps/proper:
+ @$(REBAR) -C rebar.tests.config get-deps
+ cd deps/proper && $(REBAR) compile
+
+tests: clean deps/proper app eunit ct
-inttests: clean app eunit intct
+inttests: clean deps/proper app eunit intct
eunit:
- @$(REBAR) eunit skip_deps=true
+ @$(REBAR) -C rebar.tests.config eunit skip_deps=true
ct:
- @$(REBAR) ct skip_deps=true suites=http,proper,ws
+ @$(REBAR) -C rebar.tests.config ct skip_deps=true suites=http,proper,ws
intct:
- @$(REBAR) ct skip_deps=true suites=http,proper,ws,autobahn
+ @$(REBAR) -C rebar.tests.config ct skip_deps=true suites=http,proper,ws,autobahn
+
+# Dialyzer.
build-plt:
- @$(DIALYZER) --build_plt --output_plt .cowboy_dialyzer.plt \
+ @$(DIALYZER) --build_plt --output_plt .$(PROJECT).plt \
--apps kernel stdlib sasl inets crypto public_key ssl
dialyze:
- @$(DIALYZER) --src src --plt .cowboy_dialyzer.plt --no_native \
+ @$(DIALYZER) --src src --plt .$(PROJECT).plt --no_native \
-Werror_handling -Wrace_conditions -Wunmatched_returns # -Wunderspecs
-
-docs:
- @$(REBAR) doc skip_deps=true