forked from rabbitmq/rabbitmq-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.ranch
41 lines (37 loc) · 918 Bytes
/
BUILD.ranch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
load("@rules_erlang//:app_file.bzl", "app_file")
load("@rules_erlang//:erlang_app_info.bzl", "erlang_app_info")
load("@rules_erlang//:erlang_app.bzl", "DEFAULT_ERLC_OPTS")
load("@rules_erlang//:erlang_bytecode.bzl", "erlang_bytecode")
erlang_bytecode(
name = "beam_files",
srcs = glob(["src/**/*.erl"]),
hdrs = glob([
"include/**/*.hrl",
"src/**/*.hrl",
]),
dest = "ebin",
erlc_opts = DEFAULT_ERLC_OPTS,
)
genrule(
name = "appup",
srcs = ["src/ranch.appup"],
outs = ["ebin/ranch.appup"],
cmd = "cp $< $@",
)
app_file(
name = "app_file",
app_name = "ranch",
app_version = "2.1.0",
modules = [":beam_files"],
)
erlang_app_info(
name = "erlang_app",
hdrs = glob(["include/**/*.hrl"]),
app = ":app_file",
app_name = "ranch",
beam = [
":beam_files",
":appup",
],
visibility = ["//visibility:public"],
)