Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ERL=erl
  2. ERLC=erlc
  3. REBAR=./rebar $(REBAR_ARGS)
  4. all: compile
  5. compile: check-slex get-deps
  6. @$(REBAR) compile
  7. check-slex: src/erlydtl_scanner.erl
  8. src/erlydtl_scanner.erl: src/erlydtl_scanner.slex
  9. @echo Notice: $@ is outdated by $<, consider running "'make slex'".
  10. get-deps:
  11. @$(REBAR) get-deps
  12. update-deps:
  13. @$(REBAR) update-deps
  14. .PHONY: tests
  15. tests:
  16. @$(REBAR) eunit
  17. check: tests dialyze
  18. DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions -Wunmatched_returns
  19. dialyze:
  20. @dialyzer -nn $(DIALYZER_OPTS) ebin || [ $$? -eq 2 ];
  21. ## In case you are missing a plt file for dialyzer,
  22. ## you can run/adapt this command
  23. PLT_APPS ?=
  24. plt:
  25. @dialyzer -n -nn --build_plt --apps \
  26. erts kernel stdlib sasl compiler \
  27. crypto syntax_tools runtime_tools \
  28. tools webtool hipe inets eunit
  29. clean:
  30. @echo "Clean merl..." ; $(MAKE) -C deps/merl clean
  31. @$(REBAR) -C rebar-slex.config clean
  32. rm -fv erl_crash.dump
  33. # rebuild any .slex files as well.. not included by default to avoid
  34. # the slex dependency, which is only needed in case the .slex file has
  35. # been modified locally.
  36. slex: REBAR_DEPS ?= get-deps update-deps
  37. slex: slex-compile
  38. slex-skip-deps: REBAR_DEPS:=
  39. slex-skip-deps: slex-compile
  40. slex-compile:
  41. @$(REBAR) -C rebar-slex.config $(REBAR_DEPS) compile
  42. shell:
  43. @$(ERL) -pz ebin deps/*/ebin