2021-03-12 16:54:14 +00:00
|
|
|
load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make")
|
2019-01-28 21:10:31 +00:00
|
|
|
|
2021-02-26 20:21:13 +00:00
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "all_srcs",
|
2021-12-30 16:37:31 +00:00
|
|
|
srcs = glob(
|
|
|
|
include = ["**"],
|
|
|
|
exclude = ["*.bazel"],
|
|
|
|
),
|
2021-02-26 20:21:13 +00:00
|
|
|
)
|
|
|
|
|
2022-06-17 17:05:28 +00:00
|
|
|
# I tested and this builds for me on macOS and Linux, did not check Windows
|
2019-01-28 21:10:31 +00:00
|
|
|
configure_make(
|
|
|
|
name = "bison",
|
2021-11-19 00:56:08 +00:00
|
|
|
build_data = [
|
|
|
|
"@m4",
|
|
|
|
],
|
|
|
|
env = {
|
|
|
|
"M4": "$$EXT_BUILD_DEPS$$/bin/m4/bin/m4",
|
|
|
|
},
|
2021-03-11 17:14:00 +00:00
|
|
|
lib_source = ":all_srcs",
|
|
|
|
out_binaries = [
|
2019-01-28 21:10:31 +00:00
|
|
|
"bison",
|
|
|
|
"yacc",
|
|
|
|
],
|
2021-03-11 17:14:00 +00:00
|
|
|
out_static_libs = ["liby.a"],
|
2019-01-28 21:10:31 +00:00
|
|
|
)
|