Skip to content

Instantly share code, notes, and snippets.

@ericbmerritt
Created September 2, 2012 14:59
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save ericbmerritt/3600078 to your computer and use it in GitHub Desktop.
Save ericbmerritt/3600078 to your computer and use it in GitHub Desktop.
Dialyzer Example Makefile
# -*- 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/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment