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