Debian Codegraph @

Makefile

raw symbols SCIP
1 # See LICENSE for licensing information.
2
3 PROJECT = cowboy
4 PROJECT_DESCRIPTION = Small, fast, modern HTTP server.
5 PROJECT_VERSION = 2.18.0
6 PROJECT_REGISTERED = cowboy_clock
7
8 # Options.
9
10 PLT_APPS = public_key ssl # ct_helper gun common_test inets
11 CT_OPTS += -ct_hooks cowboy_ct_hook [] # -boot start_sasl
12 #CT_OPTS += +JPperf true +S 1
13
14 # Dependencies.
15
16 LOCAL_DEPS = crypto
17
18 DEPS = cowlib ranch
19 dep_cowlib = git https://github.com/ninenines/cowlib 2.19.0
20 dep_ranch = git https://github.com/ninenines/ranch 1.8.1
21
22 ifeq ($(COWBOY_QUICER),1)
23 DEPS += quicer
24 dep_quicer = git https://github.com/emqx/quic main
25 endif
26
27 DOC_DEPS = asciideck
28
29 TEST_DEPS = $(if $(CI_ERLANG_MK),ci.erlang.mk) ct_helper gun
30 dep_ct_helper = git https://github.com/ninenines/ct_helper master
31 dep_gun = git https://github.com/ninenines/gun master
32
33 # CI configuration.
34
35 dep_ci.erlang.mk = git https://github.com/ninenines/ci.erlang.mk master
36 DEP_EARLY_PLUGINS = ci.erlang.mk
37
38 AUTO_CI_OTP ?= OTP-LATEST-24+
39 AUTO_CI_WINDOWS ?= OTP-LATEST-24+
40
41 # Hex configuration.
42
43 define HEX_TARBALL_EXTRA_METADATA
44 #{
45 licenses => [<<"ISC">>],
46 links => #{
47 <<"User guide">> => <<"https://ninenines.eu/docs/en/cowboy/2.18/guide/">>,
48 <<"Function reference">> => <<"https://ninenines.eu/docs/en/cowboy/2.18/manual/">>,
49 <<"GitHub">> => <<"https://github.com/ninenines/cowboy">>,
50 <<"Sponsor">> => <<"https://github.com/sponsors/essen">>
51 }
52 }
53 endef
54
55 hex_req_ranch = >= 1.8.0 and < 3.0.0
56 hex_req_cowlib = >= 2.19.0 and < 3.0.0
57
58 # Standard targets.
59
60 include erlang.mk
61
62 # Extra files to include in Hex package.
63
64 HEX_TARBALL_FILES += doc/src/guide/security_model.asciidoc \
65 doc/src/guide/security_checklist.asciidoc
66
67 # Don't run the examples/autobahn test suites by default.
68
69 ifndef FULL
70 CT_SUITES := $(filter-out examples http_perf ws_autobahn ws_perf,$(CT_SUITES))
71 endif
72
73 # Don't run HTTP/3 test suites on Windows.
74
75 ifeq ($(PLATFORM),msys2)
76 CT_SUITES := $(filter-out rfc9114 rfc9204 rfc9220,$(CT_SUITES))
77 endif
78
79 # Compile options.
80
81 ERLC_OPTS += +warn_missing_spec +warn_untyped_record # +bin_opt_info
82 TEST_ERLC_OPTS += +'{parse_transform, eunit_autoexport}'
83
84 ifeq ($(COWBOY_QUICER),1)
85 ERLC_OPTS += -D COWBOY_QUICER=1
86 TEST_ERLC_OPTS += -D COWBOY_QUICER=1
87 endif
88
89 # Generate rebar.config on build.
90
91 app:: rebar.config
92
93 # Fix quicer compilation for HTTP/3.
94
95 autopatch-quicer::
96 $(verbose) printf "%s\n" "all: ;" > $(DEPS_DIR)/quicer/c_src/Makefile.erlang.mk
97
98 # Dialyze the tests.
99
100 #DIALYZER_OPTS += --src -r test
101
102 # h2spec setup.
103
104 GOPATH := $(ERLANG_MK_TMP)/gopath
105 export GOPATH
106
107 H2SPEC := $(GOPATH)/src/github.com/summerwind/h2spec/h2spec
108 export H2SPEC
109
110 # @todo It would be better to allow these dependencies to be specified
111 # on a per-target basis instead of for all targets.
112 test-build:: $(H2SPEC)
113
114 $(H2SPEC):
115 $(gen_verbose) mkdir -p $(GOPATH)/src/github.com/summerwind
116 $(verbose) git clone --depth 1 https://github.com/summerwind/h2spec $(dir $(H2SPEC)) || true
117 $(verbose) $(MAKE) -C $(dir $(H2SPEC)) build MAKEFLAGS= || true
118
119 # Prepare for the release.
120
121 prepare_tag:
122 $(verbose) $(warning Hex metadata: $(HEX_TARBALL_EXTRA_METADATA))
123 $(verbose) echo
124 $(verbose) echo -n "Most recent tag: "
125 $(verbose) git tag --sort taggerdate | tail -n1
126 $(verbose) git verify-tag `git tag --sort taggerdate | tail -n1`
127 $(verbose) echo -n "MAKEFILE: "
128 $(verbose) grep -m1 PROJECT_VERSION Makefile
129 $(verbose) echo -n "APP: "
130 $(verbose) grep -m1 vsn ebin/$(PROJECT).app | sed 's/ //g'
131 $(verbose) echo -n "GUIDE: "
132 $(verbose) grep -h dep_$(PROJECT)_commit doc/src/guide/*.asciidoc || true
133 $(verbose) echo
134 $(verbose) echo "Links in the README:"
135 $(verbose) grep http.*:// README.asciidoc
136 $(verbose) echo
137 $(verbose) echo "Titles in most recent CHANGELOG:"
138 $(verbose) for f in `ls -rv doc/src/guide/migrating_from_*.asciidoc | head -n1`; do \
139 echo $$f:; \
140 grep == $$f; \
141 done
142 $(verbose) echo
143 $(verbose) echo -n "LICENSE: " ; head -n1 LICENSE
144 $(verbose) echo -n "Guide: " ; grep Copyright doc/src/guide/introduction.asciidoc
145 $(verbose) echo
146 $(verbose) echo "Dependencies:"
147 $(verbose) grep ^DEPS Makefile || echo "DEPS ="
148 $(verbose) grep ^dep_ Makefile || true
149 $(verbose) grep ^hex_req_ Makefile || true
150 $(verbose) echo
151 $(verbose) echo "rebar.config:"
152 $(verbose) cat rebar.config || true