Makefile 821 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. REBAR = ./rebar3
  2. MINIMAL_COVERAGE = 55
  3. all: compile
  4. $(REBAR):
  5. wget https://github.com/erlang/rebar3/releases/download/3.13.2/rebar3
  6. chmod +x rebar3
  7. compile: src/epgsql_errcodes.erl $(REBAR)
  8. @$(REBAR) compile
  9. clean: $(REBAR)
  10. @$(REBAR) clean
  11. @rm -f doc/*.html
  12. @rm -f doc/erlang.png
  13. @rm -f doc/stylesheet.css
  14. @rm -f doc/edoc-info
  15. src/epgsql_errcodes.erl:
  16. ./generate_errcodes_src.sh > src/epgsql_errcodes.erl
  17. common-test:
  18. $(REBAR) ct --readable true -c
  19. eunit:
  20. $(REBAR) eunit -c
  21. # Fail the build if coverage falls below 55%
  22. cover:
  23. $(REBAR) cover -v --min_coverage $(MINIMAL_COVERAGE)
  24. test: compile eunit common-test cover
  25. dialyzer: compile
  26. @$(REBAR) dialyzer
  27. elvis: $(REBAR)
  28. @$(REBAR) as lint lint
  29. edoc: $(REBAR)
  30. @$(REBAR) edoc
  31. .PHONY: all compile clean common-test eunit cover test dialyzer elvis