Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # See LICENSE for licensing information.
  2. PROJECT = ranch
  3. PROJECT_DESCRIPTION = Socket acceptor pool for TCP protocols.
  4. PROJECT_VERSION = 2.0.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.5.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-21+
  22. AUTO_CI_HIPE ?= OTP-LATEST
  23. # AUTO_CI_ERLLVM ?= OTP-LATEST
  24. AUTO_CI_WINDOWS ?= OTP-21+
  25. # Standard targets.
  26. include erlang.mk
  27. # Don't run the havoc test suite by default.
  28. ifndef FULL
  29. CT_SUITES := $(filter-out stampede,$(CT_SUITES))
  30. endif
  31. # Compile options.
  32. ERLC_OPTS += +warn_missing_spec +warn_untyped_record
  33. TEST_ERLC_OPTS += +'{parse_transform, eunit_autoexport}'
  34. # Dialyze the tests.
  35. DIALYZER_OPTS += --src -r test
  36. # Use erl_make_certs from the tested release during CI
  37. # and ensure that ct_helper is always recompiled.
  38. #
  39. # Note that erl_make_certs was removed from OTP-20.1. For now
  40. # we are fine using the most recent version from OTP-20.
  41. ci-setup:: $(DEPS_DIR)/ct_helper
  42. $(gen_verbose) cp ~/.kerl/builds/$(CI_OTP_RELEASE)/otp_src_git/lib/ssl/test/erl_make_certs.erl deps/ct_helper/src/ || true
  43. $(gen_verbose) $(MAKE) -C $(DEPS_DIR)/ct_helper clean app
  44. # Prepare for the release.
  45. prepare_tag:
  46. $(verbose) echo -n "Most recent tag: "
  47. $(verbose) git tag | tail -n1
  48. $(verbose) git verify-tag `git tag | tail -n1`
  49. $(verbose) echo -n "MAKEFILE: "
  50. $(verbose) grep -m1 PROJECT_VERSION Makefile
  51. $(verbose) echo -n "APP: "
  52. $(verbose) grep -m1 vsn ebin/$(PROJECT).app | sed 's/ //g'
  53. $(verbose) echo -n "APPUP: "
  54. $(verbose) grep -m1 {\" src/$(PROJECT).appup
  55. $(verbose) echo
  56. $(verbose) echo "Links in the README:"
  57. $(verbose) grep http.*:// README.asciidoc
  58. $(verbose) echo
  59. $(verbose) echo "Titles in most recent CHANGELOG:"
  60. $(verbose) for f in `ls -rv doc/src/guide/migrating_from_*.asciidoc | head -n1`; do \
  61. echo $$f:; \
  62. grep == $$f; \
  63. done