Makefile 923 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. APP=jsone
  2. NODE=$(APP)@localhost
  3. DIALYZER_OPTS=-Werror_handling -Wrace_conditions -Wunmatched_returns
  4. DEPENDED_APPS=
  5. all: compile xref eunit dialyze
  6. init:
  7. @./rebar get-deps compile
  8. compile:
  9. @./rebar compile skip_deps=true
  10. xref:
  11. @./rebar xref skip_deps=true
  12. clean:
  13. @./rebar clean skip_deps=true
  14. eunit:
  15. @./rebar eunit skip_deps=true
  16. edoc:
  17. @./rebar doc skip_deps=true
  18. start: compile
  19. erl -sname $(NODE) -pz ebin deps/*/ebin \
  20. -eval 'erlang:display({start_depended_app, [{A, application:start(A)} || A <- [$(DEPENDED_APPS)]]}).' \
  21. -eval 'erlang:display({start_app, $(APP), application:start($(APP))}).'
  22. .dialyzer.plt:
  23. touch .dialyzer.plt
  24. dialyzer --build_plt --plt .dialyzer.plt --apps erts kernel stdlib $(shell echo $(DEPENDED_APPS) | sed -e 's/,/ /g')
  25. dialyze: .dialyzer.plt
  26. dialyzer --plt .dialyzer.plt -r ebin $(DIALYZER_OPTS)
  27. create_app:
  28. @./rebar create-app appid=$(APP) skip_deps=true