Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # See LICENSE for licensing information.
  2. PROJECT = cowboy
  3. PROJECT_DESCRIPTION = Small, fast, modern HTTP server.
  4. PROJECT_VERSION = 2.6.1
  5. PROJECT_REGISTERED = cowboy_clock
  6. # Options.
  7. PLT_APPS = public_key ssl
  8. CT_OPTS += -ct_hooks cowboy_ct_hook [] # -boot start_sasl
  9. # Dependencies.
  10. LOCAL_DEPS = crypto
  11. DEPS = cowlib ranch
  12. dep_cowlib = git https://github.com/ninenines/cowlib 2.7.1
  13. dep_ranch = git https://github.com/ninenines/ranch 1.7.1
  14. DOC_DEPS = asciideck
  15. TEST_DEPS = $(if $(CI_ERLANG_MK),ci.erlang.mk) ct_helper gun proper
  16. dep_ct_helper = git https://github.com/extend/ct_helper master
  17. dep_gun = git https://github.com/ninenines/gun 1.3.0
  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-19+
  22. AUTO_CI_HIPE ?= OTP-LATEST
  23. # AUTO_CI_ERLLVM ?= OTP-LATEST
  24. AUTO_CI_WINDOWS ?= OTP-19+
  25. # Standard targets.
  26. include erlang.mk
  27. # Don't run the examples test suite by default.
  28. ifndef FULL
  29. CT_SUITES := $(filter-out examples ws_autobahn,$(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. # Generate rebar.config on build.
  35. app:: rebar.config
  36. # Dialyze the tests.
  37. DIALYZER_OPTS += --src -r test
  38. # h2spec setup.
  39. GOPATH := $(ERLANG_MK_TMP)/gopath
  40. export GOPATH
  41. H2SPEC := $(GOPATH)/src/github.com/summerwind/h2spec/h2spec
  42. export H2SPEC
  43. # @todo It would be better to allow these dependencies to be specified
  44. # on a per-target basis instead of for all targets.
  45. test-build:: $(H2SPEC)
  46. $(H2SPEC):
  47. $(gen_verbose) mkdir -p $(GOPATH)/src/github.com/summerwind
  48. $(verbose) git clone --depth 1 https://github.com/summerwind/h2spec $(dir $(H2SPEC)) || true
  49. $(verbose) $(MAKE) -C $(dir $(H2SPEC)) build MAKEFLAGS= || true
  50. # Use erl_make_certs from the tested release during CI
  51. # and ensure that ct_helper is always recompiled.
  52. ci-setup:: clean deps test-deps
  53. $(gen_verbose) cp ~/.kerl/builds/$(CI_OTP_RELEASE)/otp_src_git/lib/ssl/test/erl_make_certs.erl deps/ct_helper/src/ || true
  54. $(gen_verbose) $(MAKE) -C $(DEPS_DIR)/ct_helper clean app