Makefile 736 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. REBAR := ./rebar3
  2. REBAR_URL := https://s3.amazonaws.com/rebar3/rebar3
  3. ERL ?= erl
  4. .PHONY: all compile shell test clean xref dialyzer
  5. all: compile
  6. compile: $(REBAR)
  7. $(REBAR) compile
  8. shell: $(REBAR)
  9. $(REBAR) shell
  10. test: $(REBAR)
  11. $(REBAR) as test ct
  12. clean: $(REBAR) clean_doc
  13. $(REBAR) clean
  14. clean_doc:
  15. @rm -f doc/*.html
  16. @rm -f doc/erlang.png
  17. @rm -f doc/edoc-info
  18. xref: $(REBAR)
  19. $(REBAR) as test xref
  20. dialyzer: $(REBAR)
  21. $(REBAR) as check dialyzer
  22. doc: $(REBAR)
  23. $(REBAR) edoc
  24. doc_private: $(REBAR)
  25. $(REBAR) as doc_private edoc
  26. ./rebar3:
  27. $(ERL) -noshell -s inets -s ssl \
  28. -eval '{ok, saved_to_file} = httpc:request(get, {"$(REBAR_URL)", []}, [], [{stream, "./rebar3"}])' \
  29. -s init stop
  30. chmod +x ./rebar3