-
Notifications
You must be signed in to change notification settings - Fork 2
/
BUILD.bazel
39 lines (34 loc) · 898 Bytes
/
BUILD.bazel
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
load("//lib:defs.bzl", "dep_path", "runtime_path")
load("//lib:lib.bzl", "package_lib")
load("//toolchains/make:configure.bzl", "configure_make_lib")
load(":package.bzl", "NAME", "STATIC_LIBS")
package(default_visibility = ["//:__subpackages__"])
package_lib(
runtime_for = [NAME],
version_regex = r'<a href="bison-([^"]+).tar.gz">',
version_url = "https://ftp.gnu.org/gnu/bison/",
)
# TODO: add deps:
# - libintl
# - libreadline
# - libtextstyle
BUILD_DEPS = [
"//lib/m4:runtime",
]
configure_make_lib(
name = NAME,
build_data = BUILD_DEPS,
configure_options = [
'--with-libiconv-prefix="{}"'.format(dep_path(
"iconv",
double_escape = True,
)),
],
env = {"PATH": runtime_path(BUILD_DEPS)},
out_binaries = [
"bison",
"yacc",
],
out_static_libs = STATIC_LIBS,
deps = ["//lib/iconv"],
)