Makefile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. DEPS = $(CURDIR)/deps
  2. DIALYZER_OPTS = -Wunderspecs
  3. # List dependencies that should be included in a cached dialyzer PLT file.
  4. # DIALYZER_DEPS = deps/app1/ebin \
  5. # deps/app2/ebin
  6. DEPS_PLT = bench.plt
  7. ERLANG_DIALYZER_APPS = asn1 \
  8. compiler \
  9. crypto \
  10. edoc \
  11. edoc \
  12. erts \
  13. eunit \
  14. eunit \
  15. gs \
  16. hipe \
  17. inets \
  18. kernel \
  19. mnesia \
  20. mnesia \
  21. observer \
  22. public_key \
  23. runtime_tools \
  24. runtime_tools \
  25. ssl \
  26. stdlib \
  27. syntax_tools \
  28. syntax_tools \
  29. tools \
  30. webtool \
  31. xmerl
  32. all: compile
  33. # Clean ebin and .eunit of this project
  34. clean:
  35. @rebar clean skip_deps=true
  36. # Clean this project and all deps
  37. allclean:
  38. @rebar clean
  39. compile: $(DEPS)
  40. @rebar compile
  41. compile_skip:
  42. @rebar compile skip_deps=true
  43. test: compile deps/basho_bench/basho_bench
  44. @deps/basho_bench/basho_bench pooler.config
  45. @deps/basho_bench/priv/summary.r -i tests/current
  46. deps/basho_bench/basho_bench:
  47. @(cd deps/basho_bench;$(MAKE))
  48. $(DEPS):
  49. @rebar get-deps
  50. # Full clean and removal of all deps. Remove deps first to avoid
  51. # wasted effort of cleaning deps before nuking them.
  52. distclean:
  53. @rm -rf deps $(DEPS_PLT)
  54. @rebar clean
  55. # Only include local PLT if we have deps that we are going to analyze
  56. ifeq ($(strip $(DIALYZER_DEPS)),)
  57. dialyzer: ~/.dialyzer_plt
  58. @dialyzer $(DIALYZER_OPTS) -r ebin
  59. else
  60. dialyzer: ~/.dialyzer_plt $(DEPS_PLT)
  61. @dialyzer $(DIALYZER_OPTS) --plts ~/.dialyzer_plt $(DEPS_PLT) -r ebin
  62. $(DEPS_PLT):
  63. @dialyzer --build_plt $(DIALYZER_DEPS) --output_plt $(DEPS_PLT)
  64. endif
  65. ~/.dialyzer_plt:
  66. @echo "ERROR: Missing ~/.dialyzer_plt. Please wait while a new PLT is compiled."
  67. dialyzer --build_plt --apps $(ERLANG_DIALYZER_APPS)
  68. @echo "now try your build again"
  69. doc:
  70. @rebar doc skip_deps=true
  71. shell:
  72. erl -pa deps/*/ebin ebin
  73. tags:
  74. find src deps -name "*.[he]rl" -print | etags -
  75. .PHONY: all compile eunit test dialyzer clean allclean distclean doc tags