Makefile 770 B

1234567891011121314151617181920212223242526272829303132333435
  1. .PHONY: all compile run test doc clean
  2. REBAR=$(shell which rebar3 || echo ./rebar3)
  3. DIALYZER_APPS = asn1 compiler crypto erts inets kernel public_key sasl ssl stdlib syntax_tools tools
  4. all: $(REBAR) compile
  5. compile:
  6. $(REBAR) as dev compile
  7. run:
  8. erl -pa _build/dev/lib/*/ebin -boot start_sasl -config config/demo.config -run pooler
  9. test:
  10. $(REBAR) eunit skip_deps=true verbose=3
  11. doc:
  12. $(REBAR) as dev edoc
  13. clean:
  14. $(REBAR) as dev clean
  15. rm -rf ./erl_crash.dump
  16. dialyzer:
  17. $(REBAR) as dev dialyzer
  18. # Get rebar if it doesn't exist
  19. REBAR_URL=https://s3.amazonaws.com/rebar3/rebar3
  20. ./rebar3:
  21. erl -noinput -noshell -s inets -s ssl -eval '{ok, _} = httpc:request(get, {"${REBAR_URL}", []}, [], [{stream, "${REBAR}"}])' -s init stop
  22. chmod +x ${REBAR}