public
Last active

Dialyzer Example Makefile

  • Download Gist
dialyzer.mkf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
# -*- mode: Makefile; fill-column: 80; comment-column: 75; -*-
 
ERL = $(shell which erl)
 
ERLFLAGS= -pa $(CURDIR)/.eunit -pa $(CURDIR)/ebin -pa $(CURDIR)/*/ebin
 
REBAR=$(shell which rebar)
 
ifeq ($(REBAR),)
$(error "Rebar not available on this system")
endif
 
DEPSOLVER_PLT=$(CURDIR)/.depsolver_plt
 
.PHONY: dialyzer typer clean distclean
 
$(DEPSOLVER_PLT):
dialyzer --output_plt $(DEPSOLVER_PLT) --build_plt \
--apps erts kernel stdlib crypto public_key -r deps
 
dialyzer: $(DEPSOLVER_PLT)
dialyzer --plt $(DEPSOLVER_PLT) -Wrace_conditions --src src
 
typer: $(DEPSOLVER_PLT)
typer --plt $(DEPSOLVER_PLT) -r ./src
 
clean:
$(REBAR) clean
 
distclean: clean
rm $(DEPSOLVER_PLT)
rm -rvf $(CURDIR)/deps/*

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.