Makefile 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # See LICENSE for licensing information.
  2. PROJECT = ranch
  3. PROJECT_DESCRIPTION = Socket acceptor pool for TCP protocols.
  4. PROJECT_VERSION = 1.8.0
  5. PROJECT_REGISTERED = ranch_server
  6. # Options.
  7. CT_OPTS += -pa test -ct_hooks ranch_ct_hook [] # -boot start_sasl
  8. PLT_APPS = crypto public_key tools
  9. # Dependencies.
  10. LOCAL_DEPS = ssl
  11. DOC_DEPS = asciideck
  12. TEST_DEPS = $(if $(CI_ERLANG_MK),ci.erlang.mk) ct_helper
  13. dep_ct_helper = git https://github.com/ninenines/ct_helper master
  14. # CI configuration.
  15. dep_ci.erlang.mk = git https://github.com/ninenines/ci.erlang.mk master
  16. DEP_EARLY_PLUGINS = ci.erlang.mk
  17. AUTO_CI_OTP ?= OTP-21+
  18. AUTO_CI_HIPE ?= OTP-LATEST
  19. # AUTO_CI_ERLLVM ?= OTP-LATEST
  20. AUTO_CI_WINDOWS ?= OTP-21+
  21. # Hex configuration.
  22. define HEX_TARBALL_EXTRA_METADATA
  23. #{
  24. licenses => [<<"ISC">>],
  25. links => #{
  26. <<"User guide">> => <<"https://ninenines.eu/docs/en/ranch/1.8/guide/">>,
  27. <<"Function reference">> => <<"https://ninenines.eu/docs/en/ranch/1.8/manual/">>,
  28. <<"GitHub">> => <<"https://github.com/ninenines/ranch">>,
  29. <<"Sponsor">> => <<"https://github.com/sponsors/essen">>
  30. }
  31. }
  32. endef
  33. # Standard targets.
  34. include erlang.mk
  35. # Compile options.
  36. TEST_ERLC_OPTS += +'{parse_transform, eunit_autoexport}'
  37. # Dialyze the tests.
  38. DIALYZER_OPTS += --src -r test
  39. # Use erl_make_certs from the tested release during CI
  40. # and ensure that ct_helper is always recompiled.
  41. #
  42. # Note that erl_make_certs was removed from OTP-20.1. For now
  43. # we are fine using the most recent version from OTP-20.
  44. ci-setup:: $(DEPS_DIR)/ct_helper
  45. $(gen_verbose) cp ~/.kerl/builds/$(CI_OTP_RELEASE)/otp_src_git/lib/ssl/test/erl_make_certs.erl deps/ct_helper/src/ || true
  46. $(gen_verbose) $(MAKE) -C $(DEPS_DIR)/ct_helper clean app
  47. # Prepare for the release.
  48. prepare_tag:
  49. $(verbose) $(warning Hex metadata: $(HEX_TARBALL_EXTRA_METADATA))
  50. $(verbose) echo
  51. $(verbose) echo -n "Most recent tag: "
  52. $(verbose) git tag --sort taggerdate | tail -n1
  53. $(verbose) git verify-tag `git tag --sort taggerdate | tail -n1`
  54. $(verbose) echo -n "MAKEFILE: "
  55. $(verbose) grep -m1 PROJECT_VERSION Makefile
  56. $(verbose) echo -n "APP: "
  57. $(verbose) grep -m1 vsn ebin/$(PROJECT).app | sed 's/ //g'
  58. $(verbose) echo -n "GUIDE: "
  59. $(verbose) grep -h dep_$(PROJECT)_commit doc/src/guide/*.asciidoc || true
  60. $(verbose) echo
  61. $(verbose) echo "Dependencies:"
  62. $(verbose) grep ^DEPS Makefile || echo "DEPS ="
  63. $(verbose) grep ^dep_ Makefile || true