Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. find doc -name '*.html' | xargs sed -i.orig 's/ISO-8859-1/UTF-8/'
  19. ERL_LIBS=deps/edown deps/edown/make_doc
  20. sed -i.org 's_http://github.com/esl/.*doc_doc_' README.md && rm README.md.org
  21. start: compile
  22. erl -sname $(NODE) -pz ebin deps/*/ebin \
  23. -eval 'erlang:display({start_depended_app, [{A, application:start(A)} || A <- [$(DEPENDED_APPS)]]}).' \
  24. -eval 'erlang:display({start_app, $(APP), application:start($(APP))}).'
  25. .dialyzer.plt:
  26. touch .dialyzer.plt
  27. dialyzer --build_plt --plt .dialyzer.plt --apps erts kernel stdlib $(shell echo $(DEPENDED_APPS) | sed -e 's/,/ /g')
  28. dialyze: .dialyzer.plt
  29. dialyzer --plt .dialyzer.plt -r ebin $(DIALYZER_OPTS)
  30. create_app:
  31. @./rebar create-app appid=$(APP) skip_deps=true