mirror of
https://github.com/depp/syncfiles.git
synced 2024-11-26 15:49:19 +00:00
5ad207f785
This simplifies the conversion test, since we don't need to be careful about which data we run the conversion test in. It will also simplify the command-line conversion tool and its distribution. The classic Mac OS version of this program will continue to embed conversion tables in the resource fork.
52 lines
934 B
Python
52 lines
934 B
Python
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
|
|
load("//bazel:copts.bzl", "COPTS")
|
|
|
|
genrule(
|
|
name = "data",
|
|
srcs = [
|
|
"//charmap:data",
|
|
"//scripts:data",
|
|
],
|
|
outs = [
|
|
"charmap_data.c",
|
|
"charmap_info.c",
|
|
"charmap_region.c",
|
|
"charmap.r",
|
|
],
|
|
cmd = "$(execpath //gen:macscript) -dest=$(RULEDIR) -src=. -quiet -format=false",
|
|
tools = [
|
|
"//gen:macscript",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "convert",
|
|
srcs = [
|
|
"charmap_data.c",
|
|
"charmap_info.c",
|
|
"charmap_region.c",
|
|
"convert.c",
|
|
"convert_1f.c",
|
|
"convert_1r.c",
|
|
"toolbox.c",
|
|
],
|
|
hdrs = [
|
|
"convert.h",
|
|
"data.h",
|
|
"defs.h",
|
|
"test.h",
|
|
],
|
|
copts = COPTS,
|
|
)
|
|
|
|
cc_test(
|
|
name = "convert_test",
|
|
srcs = [
|
|
"convert_test.c",
|
|
],
|
|
copts = COPTS,
|
|
deps = [
|
|
":convert",
|
|
],
|
|
)
|