Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. .PHONY: all compile run test doc clean
  2. .PHONY: build_plt add_to_plt dialyzer
  3. REBAR=./rebar3
  4. DIALYZER_APPS = asn1 compiler crypto erts inets kernel public_key sasl ssl stdlib syntax_tools tools
  5. all: $(REBAR) compile
  6. compile:
  7. $(REBAR) as dev compile
  8. run:
  9. erl -pa _build/dev/lib/*/ebin -boot start_sasl -config config/demo.config -run pooler
  10. test:
  11. $(REBAR) eunit skip_deps=true verbose=3
  12. doc:
  13. $(REBAR) as dev edoc
  14. clean:
  15. $(REBAR) clean
  16. rm -rf ./erl_crash.dump
  17. build_plt: clean compile
  18. ifneq ("$(wildcard erlang.plt)","")
  19. @echo "Erlang plt file already exists"
  20. else
  21. dialyzer --build_plt --output_plt erlang.plt --apps $(DIALYZER_APPS)
  22. endif
  23. ifneq ("$(wildcard pooler.plt)","")
  24. @echo "pooler plt file already exists"
  25. else
  26. dialyzer --build_plt --output_plt pooler.plt _build/default/lib/*/ebin/
  27. endif
  28. add_to_plt: build_plt
  29. dialyzer --add_to_plt --plt erlang.plt --output_plt erlang.plt.new --apps $(DIALYZER_APPS)
  30. dialyzer --add_to_plt --plt pooler.plt --output_plt pooler.plt.new _build/default/lib/*/ebin/
  31. mv erlang.plt.new erlang.plt
  32. mv pooler.plt.new pooler.plt
  33. dialyzer:
  34. dialyzer --src src -r src --plts erlang.plt pooler.plt -Wno_return -Werror_handling -Wrace_conditions -Wunderspecs | fgrep -v -f ./dialyzer.ignore-warnings