Permalink
Browse files

Add make dialyze target

  • Loading branch information...
1 parent 2b9d67d commit 523170228aa08424433315af8b628af4d2014ebc @yrashk yrashk committed Oct 28, 2012
Showing with 15 additions and 1 deletion.
  1. +3 −1 .gitignore
  2. +12 −0 Makefile
View
@@ -10,4 +10,6 @@
/deps/*
/ebin
/rel/elixir
-erl_crash.dump
+erl_crash.dump
+.dialyzer_plt
+.dialyzer.base_plt
View
@@ -128,3 +128,15 @@ test_elixir: test_kernel test_mix test_ex_unit test_eex test_iex
test_kernel: compile
@ echo "==> kernel (exunit)"
@ cd lib/elixir && time ../../bin/elixir -r "test/elixir/test_helper.exs" -pr "test/elixir/**/*_test.exs";
+
+.dialyzer.base_plt:
+ @ echo "==> Adding Erlang/OTP basic applications to a new base PLT"
+ @ dialyzer --output_plt .dialyzer.base_plt --build_plt --apps erts kernel stdlib compiler syntax_tools inets crypto ssl
+
+dialyze: compile .dialyzer.base_plt
+ @ rm -f .dialyzer_plt
+ @ cp .dialyzer.base_plt .dialyzer_plt
+ @ echo "==> Adding Elixir to PLT..."
+ @ dialyzer --output_plt .dialyzer_plt --add_to_plt -r lib/elixir/ebin lib/ex_unit/ebin lib/mix/ebin lib/iex/ebin lib/eex/ebin
+ @ echo "==> Dialyzing Elixir..."
+ @ dialyzer --plt .dialyzer_plt -r lib/elixir/ebin lib/ex_unit/ebin lib/mix/ebin lib/iex/ebin lib/eex/ebin

0 comments on commit 5231702

Please sign in to comment.