Skip to content

Commit

Permalink
Merge pull request #82 from horkhe/feature/mock_proc
Browse files Browse the repository at this point in the history
Refactor meck into smaller functional modules
  • Loading branch information
eproxus committed Nov 4, 2012
2 parents a6e1553 + bff3fbd commit 68b3814
Show file tree
Hide file tree
Showing 13 changed files with 1,408 additions and 827 deletions.
53 changes: 46 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,53 @@
REBAR=`which rebar || echo ./rebar`
PLTFILE=$(CURDIR)/.deps.plt
APP_DEPS=kernel stdlib eunit tools compiler
ERLFLAGS= -pa $(CURDIR)/.eunit -pa $(CURDIR)/ebin -pa $(CURDIR)/deps/*/ebin

all: compile
REBAR=$(shell which rebar)
ifeq ($(REBAR),)
$(error "Rebar not available on this system")
endif

ERL = $(shell which erl)
ifeq ($(ERL),)
$(error "Erlang must be available on this system")
endif

.PHONY: all rebuild compile doc clean test dialyzer typer \
shell clean-plt clean-doc distclean

all: compile dialyzer test doc

rebuild: clean-doc clean all

compile:
@$(REBAR) compile
@$(REBAR) skip_deps=true compile

test: force
@$(REBAR) eunit
doc:
@$(REBAR) skip_deps=true doc

clean:
@$(REBAR) clean
@$(REBAR) skip_deps=true clean

test:
@$(REBAR) skip_deps=true eunit

$(PLTFILE):
- dialyzer --build_plt --apps $(APP_DEPS) --output_plt $(PLTFILE)

dialyzer: compile $(PLTFILE)
@dialyzer --fullpath --plt $(PLTFILE) -pa $(CURDIR)/ebin -c src --src | \
fgrep -v -f ./dialyzer.ignore-warnings

typer:
typer --plt $(PLTFILE) -I include -r src

shell:
@$(ERL) $(ERLFLAGS)

clean-plt:
@rm -rf $(PLTFILE)

clean-doc:
@cd doc; ls * | grep -v overview.edoc | xargs rm -f

force: ;
distclean: clean clean-plt clean-doc
5 changes: 5 additions & 0 deletions dialyzer.ignore-warnings
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### meck:code_cover.erl has to call this unexported functions to do its
### cover passthrough magic:
Call to missing or unexported function cover:compile_beam/2
Call to missing or unexported function cover:get_term/1
Call to missing or unexported function cover:write/2
1 change: 1 addition & 0 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
{dialyzer_opts, [{warnings, [unmatched_returns]}]}.

{cover_enabled, true}.
{cover_print_enabled, true}.
{clean_files, [".eunit", "ebin/*.beam", "test/*.beam"]}.
Loading

0 comments on commit 68b3814

Please sign in to comment.