2023-01-25 16:41:56 +08:00
|
|
|
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
|
|
|
|
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
|
|
|
|
|
|
|
|
erlc_opts(
|
|
|
|
name = "erlc_opts",
|
|
|
|
values = select({
|
|
|
|
"@rules_erlang//:debug_build": [
|
|
|
|
"+debug_info",
|
|
|
|
"+report_warnings",
|
|
|
|
"+warn_export_vars",
|
|
|
|
"+warn_missing_spec",
|
2023-02-17 00:43:49 +08:00
|
|
|
"+warn_obsolete_guard",
|
2023-01-25 16:41:56 +08:00
|
|
|
"+warn_untyped_record",
|
2023-02-17 00:43:49 +08:00
|
|
|
"+warn_unused_import",
|
|
|
|
"+warn_unused_vars",
|
|
|
|
"+{warn_format,1}",
|
2023-01-25 16:41:56 +08:00
|
|
|
],
|
|
|
|
"//conditions:default": [
|
|
|
|
"+debug_info",
|
2023-02-17 00:43:49 +08:00
|
|
|
"+deterministic",
|
2023-01-25 16:41:56 +08:00
|
|
|
"+report_warnings",
|
|
|
|
"+warn_export_vars",
|
|
|
|
"+warn_missing_spec",
|
2023-02-17 00:43:49 +08:00
|
|
|
"+warn_obsolete_guard",
|
2023-01-25 16:41:56 +08:00
|
|
|
"+warn_untyped_record",
|
2023-02-17 00:43:49 +08:00
|
|
|
"+warn_unused_import",
|
|
|
|
"+warn_unused_vars",
|
|
|
|
"+{warn_format,1}",
|
2023-01-25 16:41:56 +08:00
|
|
|
],
|
|
|
|
}),
|
|
|
|
visibility = [":__subpackages__"],
|
|
|
|
)
|
|
|
|
|
|
|
|
erlang_bytecode(
|
2023-02-17 00:43:49 +08:00
|
|
|
name = "parse_transforms",
|
2023-02-28 23:47:02 +08:00
|
|
|
testonly = True,
|
|
|
|
srcs = [
|
|
|
|
"src/vararg.erl",
|
|
|
|
],
|
|
|
|
outs = [
|
|
|
|
"ebin/vararg.beam",
|
|
|
|
],
|
2023-01-25 16:41:56 +08:00
|
|
|
hdrs = [
|
2023-02-17 00:43:49 +08:00
|
|
|
"include/proper.hrl",
|
2023-01-25 16:41:56 +08:00
|
|
|
"include/proper_common.hrl",
|
|
|
|
"include/proper_internal.hrl",
|
2023-02-17 00:43:49 +08:00
|
|
|
"include/proper_param_adts.hrl",
|
2023-01-25 16:41:56 +08:00
|
|
|
],
|
|
|
|
app_name = "proper",
|
|
|
|
erlc_opts = "//:erlc_opts",
|
|
|
|
)
|
|
|
|
|
|
|
|
erlang_bytecode(
|
2023-02-17 00:43:49 +08:00
|
|
|
name = "behaviours",
|
2023-02-28 23:47:02 +08:00
|
|
|
testonly = True,
|
|
|
|
srcs = [
|
|
|
|
"src/proper_target.erl",
|
|
|
|
],
|
|
|
|
outs = [
|
|
|
|
"ebin/proper_target.beam",
|
|
|
|
],
|
2023-01-25 16:41:56 +08:00
|
|
|
hdrs = [
|
2023-02-17 00:43:49 +08:00
|
|
|
"include/proper.hrl",
|
2023-01-25 16:41:56 +08:00
|
|
|
"include/proper_common.hrl",
|
|
|
|
"include/proper_internal.hrl",
|
2023-02-17 00:43:49 +08:00
|
|
|
"include/proper_param_adts.hrl",
|
2023-01-25 16:41:56 +08:00
|
|
|
],
|
|
|
|
app_name = "proper",
|
2023-02-17 00:43:49 +08:00
|
|
|
beam = [":parse_transforms"],
|
2023-01-25 16:41:56 +08:00
|
|
|
erlc_opts = "//:erlc_opts",
|
|
|
|
)
|
|
|
|
|
|
|
|
erlang_bytecode(
|
2023-02-17 00:43:49 +08:00
|
|
|
name = "other_beam",
|
2023-02-28 23:47:02 +08:00
|
|
|
testonly = True,
|
2023-01-25 16:41:56 +08:00
|
|
|
srcs = [
|
2023-02-17 00:43:49 +08:00
|
|
|
"src/proper.erl",
|
|
|
|
"src/proper_arith.erl",
|
|
|
|
"src/proper_array.erl",
|
|
|
|
"src/proper_dict.erl",
|
|
|
|
"src/proper_erlang_abstract_code.erl",
|
|
|
|
"src/proper_fsm.erl",
|
|
|
|
"src/proper_gb_sets.erl",
|
|
|
|
"src/proper_gb_trees.erl",
|
|
|
|
"src/proper_gen.erl",
|
|
|
|
"src/proper_gen_next.erl",
|
|
|
|
"src/proper_orddict.erl",
|
|
|
|
"src/proper_ordsets.erl",
|
|
|
|
"src/proper_prop_remover.erl",
|
|
|
|
"src/proper_queue.erl",
|
|
|
|
"src/proper_sa.erl",
|
|
|
|
"src/proper_sets.erl",
|
|
|
|
"src/proper_shrink.erl",
|
|
|
|
"src/proper_statem.erl",
|
|
|
|
"src/proper_symb.erl",
|
|
|
|
"src/proper_transformer.erl",
|
|
|
|
"src/proper_types.erl",
|
|
|
|
"src/proper_typeserver.erl",
|
|
|
|
"src/proper_unicode.erl",
|
|
|
|
"src/proper_unused_imports_remover.erl",
|
|
|
|
],
|
|
|
|
outs = [
|
2023-01-25 16:41:56 +08:00
|
|
|
"ebin/proper.beam",
|
|
|
|
"ebin/proper_arith.beam",
|
|
|
|
"ebin/proper_array.beam",
|
|
|
|
"ebin/proper_dict.beam",
|
|
|
|
"ebin/proper_erlang_abstract_code.beam",
|
|
|
|
"ebin/proper_fsm.beam",
|
|
|
|
"ebin/proper_gb_sets.beam",
|
|
|
|
"ebin/proper_gb_trees.beam",
|
|
|
|
"ebin/proper_gen.beam",
|
|
|
|
"ebin/proper_gen_next.beam",
|
|
|
|
"ebin/proper_orddict.beam",
|
|
|
|
"ebin/proper_ordsets.beam",
|
|
|
|
"ebin/proper_prop_remover.beam",
|
|
|
|
"ebin/proper_queue.beam",
|
|
|
|
"ebin/proper_sa.beam",
|
|
|
|
"ebin/proper_sets.beam",
|
|
|
|
"ebin/proper_shrink.beam",
|
|
|
|
"ebin/proper_statem.beam",
|
|
|
|
"ebin/proper_symb.beam",
|
|
|
|
"ebin/proper_transformer.beam",
|
|
|
|
"ebin/proper_types.beam",
|
|
|
|
"ebin/proper_typeserver.beam",
|
|
|
|
"ebin/proper_unicode.beam",
|
|
|
|
"ebin/proper_unused_imports_remover.beam",
|
2023-02-17 00:43:49 +08:00
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/proper.hrl",
|
|
|
|
"include/proper_common.hrl",
|
|
|
|
"include/proper_internal.hrl",
|
|
|
|
"include/proper_param_adts.hrl",
|
|
|
|
],
|
|
|
|
app_name = "proper",
|
|
|
|
beam = [
|
|
|
|
":parse_transforms",
|
|
|
|
":behaviours",
|
|
|
|
],
|
|
|
|
erlc_opts = "//:erlc_opts",
|
|
|
|
)
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "beam_files",
|
2023-02-28 23:47:02 +08:00
|
|
|
testonly = True,
|
2023-02-17 00:43:49 +08:00
|
|
|
srcs = [
|
|
|
|
":behaviours",
|
|
|
|
":other_beam",
|
|
|
|
":parse_transforms",
|
2023-01-25 16:41:56 +08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "srcs",
|
2023-02-28 23:47:02 +08:00
|
|
|
testonly = True,
|
2023-01-25 16:41:56 +08:00
|
|
|
srcs = [
|
|
|
|
"src/proper.app.src",
|
|
|
|
"src/proper.erl",
|
|
|
|
"src/proper_arith.erl",
|
|
|
|
"src/proper_array.erl",
|
|
|
|
"src/proper_dict.erl",
|
|
|
|
"src/proper_erlang_abstract_code.erl",
|
|
|
|
"src/proper_fsm.erl",
|
|
|
|
"src/proper_gb_sets.erl",
|
|
|
|
"src/proper_gb_trees.erl",
|
|
|
|
"src/proper_gen.erl",
|
|
|
|
"src/proper_gen_next.erl",
|
|
|
|
"src/proper_orddict.erl",
|
|
|
|
"src/proper_ordsets.erl",
|
|
|
|
"src/proper_prop_remover.erl",
|
|
|
|
"src/proper_queue.erl",
|
|
|
|
"src/proper_sa.erl",
|
|
|
|
"src/proper_sets.erl",
|
|
|
|
"src/proper_shrink.erl",
|
|
|
|
"src/proper_statem.erl",
|
|
|
|
"src/proper_symb.erl",
|
|
|
|
"src/proper_target.erl",
|
|
|
|
"src/proper_transformer.erl",
|
|
|
|
"src/proper_types.erl",
|
|
|
|
"src/proper_typeserver.erl",
|
|
|
|
"src/proper_unicode.erl",
|
|
|
|
"src/proper_unused_imports_remover.erl",
|
|
|
|
"src/vararg.erl",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "private_hdrs",
|
2023-02-28 23:47:02 +08:00
|
|
|
testonly = True,
|
2023-01-25 16:41:56 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "public_hdrs",
|
2023-02-28 23:47:02 +08:00
|
|
|
testonly = True,
|
2023-01-25 16:41:56 +08:00
|
|
|
srcs = [
|
|
|
|
"include/proper.hrl",
|
|
|
|
"include/proper_common.hrl",
|
|
|
|
"include/proper_internal.hrl",
|
|
|
|
"include/proper_param_adts.hrl",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "priv",
|
2023-02-28 23:47:02 +08:00
|
|
|
testonly = True,
|
2023-01-25 16:41:56 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "licenses",
|
2023-02-28 23:47:02 +08:00
|
|
|
testonly = True,
|
2023-01-25 16:41:56 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "public_and_private_hdrs",
|
2023-02-28 23:47:02 +08:00
|
|
|
testonly = True,
|
2023-01-25 16:41:56 +08:00
|
|
|
srcs = [
|
|
|
|
":private_hdrs",
|
|
|
|
":public_hdrs",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "all_srcs",
|
2023-02-28 23:47:02 +08:00
|
|
|
testonly = True,
|
2023-01-25 16:41:56 +08:00
|
|
|
srcs = [
|
|
|
|
":public_and_private_hdrs",
|
|
|
|
":srcs",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
erlang_app(
|
|
|
|
name = "erlang_app",
|
2023-02-28 23:47:02 +08:00
|
|
|
testonly = True,
|
2023-01-25 16:41:56 +08:00
|
|
|
srcs = [":all_srcs"],
|
|
|
|
hdrs = [":public_hdrs"],
|
|
|
|
app_name = "proper",
|
|
|
|
beam_files = [":beam_files"],
|
|
|
|
extra_apps = ["compiler"],
|
|
|
|
)
|
|
|
|
|
|
|
|
alias(
|
|
|
|
name = "proper",
|
|
|
|
actual = ":erlang_app",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|