Makefile 564 B

12345678910111213141516171819202122232425262728293031
  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)
  13. $(REBAR) clean
  14. xref: $(REBAR)
  15. $(REBAR) as test xref
  16. dialyzer: $(REBAR)
  17. $(REBAR) as test dialyzer
  18. ./rebar3:
  19. $(ERL) -noshell -s inets -s ssl \
  20. -eval '{ok, saved_to_file} = httpc:request(get, {"$(REBAR_URL)", []}, [], [{stream, "./rebar3"}])' \
  21. -s init stop
  22. chmod +x ./rebar3