Makefile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # See LICENSE for licensing information.
  2. PROJECT = ranch
  3. PROJECT_DESCRIPTION = Socket acceptor pool for TCP protocols.
  4. PROJECT_VERSION = 2.1.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 stampede
  13. dep_ct_helper = git https://github.com/ninenines/ct_helper master
  14. dep_stampede = git https://github.com/juhlig/stampede 0.6.0
  15. # Concuerror tests.
  16. # CONCUERROR_OPTS = -v 7 -k
  17. CONCUERROR_TESTS = ranch_concuerror:start_stop ranch_concuerror:info
  18. # CI configuration.
  19. dep_ci.erlang.mk = git https://github.com/ninenines/ci.erlang.mk master
  20. DEP_EARLY_PLUGINS = ci.erlang.mk
  21. AUTO_CI_OTP ?= OTP-22+
  22. AUTO_CI_HIPE ?= OTP-LATEST
  23. # AUTO_CI_ERLLVM ?= OTP-LATEST
  24. AUTO_CI_WINDOWS ?= OTP-22+
  25. # Hex configuration.
  26. define HEX_TARBALL_EXTRA_METADATA
  27. #{
  28. licenses => [<<"ISC">>],
  29. links => #{
  30. <<"User guide">> => <<"https://ninenines.eu/docs/en/ranch/2.1/guide/">>,
  31. <<"Function reference">> => <<"https://ninenines.eu/docs/en/ranch/2.1/manual/">>,
  32. <<"GitHub">> => <<"https://github.com/ninenines/ranch">>,
  33. <<"Sponsor">> => <<"https://github.com/sponsors/essen">>
  34. }
  35. }
  36. endef
  37. # Standard targets.
  38. include erlang.mk
  39. # Don't run the havoc test suite by default.
  40. ifndef FULL
  41. CT_SUITES := $(filter-out stampede,$(CT_SUITES))
  42. endif
  43. # Compile options.
  44. ERLC_OPTS += +warn_missing_spec +warn_untyped_record
  45. TEST_ERLC_OPTS += +'{parse_transform, eunit_autoexport}'
  46. # Dialyze the tests.
  47. DIALYZER_OPTS += --src -r test
  48. # Use erl_make_certs from the tested release during CI
  49. # and ensure that ct_helper is always recompiled.
  50. #
  51. # Note that erl_make_certs was removed from OTP-20.1. For now
  52. # we are fine using the most recent version from OTP-20.
  53. ci-setup:: $(DEPS_DIR)/ct_helper
  54. $(gen_verbose) cp ~/.kerl/builds/$(CI_OTP_RELEASE)/otp_src_git/lib/ssl/test/erl_make_certs.erl deps/ct_helper/src/ || true
  55. $(gen_verbose) $(MAKE) -C $(DEPS_DIR)/ct_helper clean app
  56. # Prepare for the release.
  57. prepare_tag:
  58. $(verbose) $(warning Hex metadata: $(HEX_TARBALL_EXTRA_METADATA))
  59. $(verbose) echo
  60. $(verbose) echo -n "Most recent tag: "
  61. $(verbose) git tag --sort=creatordate | tail -n1
  62. $(verbose) git verify-tag `git tag --sort=creatordate | tail -n1`
  63. $(verbose) echo -n "MAKEFILE: "
  64. $(verbose) grep -m1 PROJECT_VERSION Makefile
  65. $(verbose) echo -n "APP: "
  66. $(verbose) grep -m1 vsn ebin/$(PROJECT).app | sed 's/ //g'
  67. $(verbose) echo -n "APPUP: "
  68. $(verbose) grep -m1 {\" src/$(PROJECT).appup
  69. $(verbose) echo -n "GUIDE: "
  70. $(verbose) grep -h dep_$(PROJECT)_commit doc/src/guide/*.asciidoc || true
  71. $(verbose) echo
  72. $(verbose) echo "Dependencies:"
  73. $(verbose) grep ^DEPS Makefile || echo "DEPS ="
  74. $(verbose) grep ^dep_ Makefile || true
  75. $(verbose) echo
  76. $(verbose) echo "Links in the README:"
  77. $(verbose) grep http.*:// README.asciidoc
  78. $(verbose) echo
  79. $(verbose) echo "Titles in most recent CHANGELOG:"
  80. $(verbose) for f in `ls -rv doc/src/guide/migrating_from_*.asciidoc | head -n1`; do \
  81. echo $$f:; \
  82. grep == $$f; \
  83. done