-
Notifications
You must be signed in to change notification settings - Fork 87
/
Copy pathBUILD
36 lines (31 loc) · 854 Bytes
/
BUILD
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
load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
package(default_visibility = ["//visibility:public"])
refresh_compile_commands(
name = "test_compile_commands",
targets = {
"//test:all": "",
}
)
py_binary(
name="amalgamate",
srcs=["amalgamate.py"],
)
genrule(
name="amalgamated",
srcs=glob(["src/**/*.c", "src/**/*.h"]),
outs=["iso14229.c", "iso14229.h"],
cmd="$(location //:amalgamate) --out_c $(location //:iso14229.c) --out_h $(location //:iso14229.h) $(SRCS)",
tools=["//:amalgamate"],
)
genrule(
name="release",
srcs=[
"iso14229.c",
"iso14229.h",
"README.md",
"LICENSE",
"AUTHORS.txt",
],
outs = ["iso14229.zip"],
cmd = "mkdir iso14229 && cp -L $(SRCS) iso14229/ && zip -r $(OUTS) iso14229",
)