-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.bzl
77 lines (73 loc) · 2.27 KB
/
app.bzl
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode")
load("@rules_erlang//:filegroup.bzl", "filegroup")
def all_srcs(name = "all_srcs"):
filegroup(
name = "srcs",
srcs = [
"src/rabbit_exchange_type_json.erl",
"src/json_filter.erl",
],
)
filegroup(name = "private_hdrs")
filegroup(name = "priv")
filegroup(
name = "license_files",
srcs = [
"LICENSE",
"LICENSE-MPL-RabbitMQ",
],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [":private_hdrs", ":public_hdrs"],
)
filegroup(
name = "all_srcs",
srcs = [":public_and_private_hdrs", ":srcs"],
)
def all_beam_files(name = "all_beam_files"):
erlang_bytecode(
name = "other_beam",
srcs = [
"src/rabbit_exchange_type_json.erl",
"src/json_filter.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "rabbitmq_exchange_json_filters",
dest = "ebin",
erlc_opts = "//:erlc_opts",
deps = ["@rabbitmq-server//deps/rabbit:erlang_app", "@rabbitmq-server//deps/rabbit_common:erlang_app"],
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
def all_test_beam_files(name = "all_test_beam_files"):
erlang_bytecode(
name = "test_other_beam",
testonly = True,
srcs = [
"src/rabbit_exchange_type_json.erl",
"src/json_filter.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "rabbitmq_exchange_json_filters",
dest = "test",
erlc_opts = "//:test_erlc_opts",
deps = ["@rabbitmq-server//deps/rabbit:erlang_app", "@rabbitmq-server//deps/rabbit_common:erlang_app"],
)
filegroup(
name = "test_beam_files",
testonly = True,
srcs = [":test_other_beam"],
)
def test_suite_beam_files(name = "test_suite_beam_files"):
erlang_bytecode(
name = "lvc_SUITE_beam_files",
testonly = True,
srcs = ["test/lvc_SUITE.erl"],
outs = ["test/lvc_SUITE.beam"],
app_name = "rabbitmq_json_filters_exchange",
erlc_opts = "//:test_erlc_opts",
deps = ["@rabbitmq-server//deps/amqp_client:erlang_app"],
)