Skip to content

Commit

Permalink
switch to erlang.mk
Browse files Browse the repository at this point in the history
xref not working out of the box
havent't solved "platform define" yet
  • Loading branch information
Ivan Dyachkov committed Feb 17, 2016
1 parent ecaa7bc commit 6e01116
Show file tree
Hide file tree
Showing 11 changed files with 6,558 additions and 59 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
erlang.mk -diff
15 changes: 10 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
doc/
erl_crash.dump
/.eunit/
/.rebar/
/deps/
logs/
/logs/
ebin/
*.beam
cover/
test/*.beam
test/ct.cover.spec
brod.d
scripts/brod
/brod.plt
.brod.plt
.erlang.mk
eunit.coverdata
sys.config
xrefr
53 changes: 10 additions & 43 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,49 +1,16 @@
.PHONY: all compile docs check test clean plt dialyze
PROJECT = brod
PROJECT_VERSION = 2.0-dev

REBAR ?= $(shell which rebar 2> /dev/null || which ./rebar)
DIALYZER_PLT = ./brod.plt
DIALYZER_OPTS = --fullpath --no_native -Werror_handling -Wrace_conditions -Wunderspecs -Wno_opaque -Wno_return -Wno_match -Wno_unused --plt $(DIALYZER_PLT)
PLT_APPS = erts kernel stdlib
DEPS = supervisor3
TEST_DEPS = meck proper

all: compile
COVER = 1

compile:
@$(REBAR) compile
EUNIT_OPTS = verbose
ERLC_OPTS = -Werror +warn_unused_vars +warn_shadow_vars +warn_unused_import +warn_obsolete_guard
CT_OPTS = -ct_use_short_names true

docs:
@$(REBAR) skip_deps=true doc
include erlang.mk

check: compile plt dialyze
ERL_LIBS := $(ERL_LIBS):$(CURDIR)

get-deps:
$(REBAR) get-deps

test: REBAR := BROD_TEST=1 $(REBAR)
test:
$(REBAR) get-deps
$(REBAR) compile
$(REBAR) eunit -v apps=brod
$(REBAR) skip_deps=true ct
./scripts/cover-summary.escript ./.eunit ./logs

clean:
@$(RM) -rf deps
@$(REBAR) clean
@$(RM) doc/*
@$(RM) -f $(DIALYZER_PLT)

plt: $(DIALYZER_PLT)

$(DIALYZER_PLT):
dialyzer --build_plt --apps $(PLT_APPS) ebin deps/supervisor3/ebin --output_plt $(DIALYZER_PLT)

dialyze: $(DIALYZER_PLT)
dialyzer -r ebin deps/supervisor3/ebin $(DIALYZER_OPTS)

xref: compile
$(REBAR) xref

escriptize: compile
@$(REBAR) escriptize

# eof
1 change: 0 additions & 1 deletion cover.spec

This file was deleted.

Loading

0 comments on commit 6e01116

Please sign in to comment.