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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
cc_binary_host {
name: "flex",
stl: "none",
srcs: [
"ccl.c",
"dfa.c",
"ecs.c",
"scanflags.c",
"gen.c",
"main.c",
"misc.c",
"nfa.c",
"parse.y",
"scan.l",
"sym.c",
"tblcmp.c",
"yylex.c",
"options.c",
"scanopt.c",
"buf.c",
"tables.c",
"tables_shared.c",
"filter.c",
"regex.c",
":flex_skel.c",
],
cflags: [
"-DHAVE_ALLOCA=1",
"-DHAVE_LIMITS_H=1",
"-DHAVE_UNISTD_H=1",
"-DHAVE_NETINET_IN_H=1",
"-DHAVE_SYS_WAIT_H=1",
"-DHAVE_STDBOOL_H=1",
"-DHAVE_REGEX_H=1",
"-DSTDC_HEADERS=1",
"-DVERSION=\"2.6.4\"",
// TODO: This should use a hermetic m4 -- this is a default that can be overwritten
// overwritten with the M4 environment variable, which may be simpler within the build.
"-DM4=\"m4\"",
"-Wno-pointer-sign",
"-Wno-unused-parameter",
"-Wno-unused-variable",
"-Wno-unused-label",
"-Wno-error=dangling-else",
"-Wno-error=incompatible-pointer-types-discards-qualifiers",
"-Wno-error=int-conversion",
],
}
genrule {
name: "flex_skel.c",
// This is lightly modified from Makefile.am
cmd: "/bin/bash $(location mkskel.sh) `dirname $(in)` m4 2.6.4 >$(out)",
tool_files: [
"mkskel.sh",
"flexint.h",
"tables_shared.c",
"tables_shared.h",
],
srcs: [
"flex.skl",
],
out: [
"skel.c",
],
}
|