2011-03-07 22:59:22 +01:00
|
|
|
# See LICENSE for licensing information.
|
|
|
|
|
2012-04-12 22:04:58 +02:00
|
|
|
PROJECT = cowboy
|
|
|
|
|
2011-06-21 17:24:07 +02:00
|
|
|
DIALYZER = dialyzer
|
2011-04-03 16:00:22 +02:00
|
|
|
REBAR = rebar
|
2011-03-23 10:54:09 +01:00
|
|
|
|
2011-03-07 22:59:22 +01:00
|
|
|
all: app
|
|
|
|
|
2012-04-12 22:04:58 +02:00
|
|
|
# Application.
|
2011-03-07 22:59:22 +01:00
|
|
|
|
2012-08-27 11:50:35 +02:00
|
|
|
deps/ranch:
|
2011-07-20 17:38:10 +02:00
|
|
|
@$(REBAR) get-deps
|
|
|
|
|
2012-08-27 11:50:35 +02:00
|
|
|
app: deps/ranch
|
2012-04-12 22:04:58 +02:00
|
|
|
@$(REBAR) compile
|
|
|
|
|
2011-03-07 22:59:22 +01:00
|
|
|
clean:
|
2011-03-23 10:54:09 +01:00
|
|
|
@$(REBAR) clean
|
2011-04-08 16:30:37 +02:00
|
|
|
rm -f test/*.beam
|
2011-03-07 22:59:22 +01:00
|
|
|
rm -f erl_crash.dump
|
|
|
|
|
2012-04-13 12:29:13 +02:00
|
|
|
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
|
|
|
|
|
2012-04-12 22:04:58 +02:00
|
|
|
# Tests.
|
|
|
|
|
|
|
|
deps/proper:
|
|
|
|
@$(REBAR) -C rebar.tests.config get-deps
|
|
|
|
cd deps/proper && $(REBAR) compile
|
2011-05-04 11:50:46 +02:00
|
|
|
|
2012-04-12 22:04:58 +02:00
|
|
|
tests: clean deps/proper app eunit ct
|
|
|
|
|
|
|
|
inttests: clean deps/proper app eunit intct
|
2011-12-24 00:58:03 +01:00
|
|
|
|
2011-05-04 11:50:46 +02:00
|
|
|
eunit:
|
2012-04-12 22:04:58 +02:00
|
|
|
@$(REBAR) -C rebar.tests.config eunit skip_deps=true
|
2011-05-04 11:50:46 +02:00
|
|
|
|
|
|
|
ct:
|
2012-04-12 22:04:58 +02:00
|
|
|
@$(REBAR) -C rebar.tests.config ct skip_deps=true suites=http,proper,ws
|
2011-12-24 00:58:03 +01:00
|
|
|
|
|
|
|
intct:
|
2012-04-12 22:04:58 +02:00
|
|
|
@$(REBAR) -C rebar.tests.config ct skip_deps=true suites=http,proper,ws,autobahn
|
|
|
|
|
|
|
|
# Dialyzer.
|
2011-04-03 16:07:27 +02:00
|
|
|
|
2011-06-21 17:24:07 +02:00
|
|
|
build-plt:
|
2012-04-12 22:04:58 +02:00
|
|
|
@$(DIALYZER) --build_plt --output_plt .$(PROJECT).plt \
|
2012-08-27 11:50:35 +02:00
|
|
|
--apps kernel stdlib sasl inets crypto public_key ssl deps/*
|
2011-06-21 17:24:07 +02:00
|
|
|
|
2011-04-03 16:07:27 +02:00
|
|
|
dialyze:
|
2012-04-12 22:04:58 +02:00
|
|
|
@$(DIALYZER) --src src --plt .$(PROJECT).plt --no_native \
|
2012-01-31 08:49:25 +01:00
|
|
|
-Werror_handling -Wrace_conditions -Wunmatched_returns # -Wunderspecs
|