aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
l---------LICENSE1
-rw-r--r--METADATA17
-rw-r--r--MODULE_LICENSE_BSD_LIKE0
l---------NOTICE1
-rw-r--r--src/Android.bp73
5 files changed, 92 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 120000
index 0000000..d24842f
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1 @@
+COPYING \ No newline at end of file
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..c6e6456
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,17 @@
+name: "flex"
+description:
+ "The Fast Lexical Analyzer - scanner generator for lexing in C and C++"
+
+third_party {
+ url {
+ type: HOMEPAGE
+ value: "http://flex.sourceforge.net/"
+ }
+ url {
+ type: GIT
+ value: "https://github.com/westes/flex"
+ }
+ version: "flex-2.5.39"
+ last_upgrade_date { year: 2018 month: 5 day: 22 }
+ license_type: NOTICE
+}
diff --git a/MODULE_LICENSE_BSD_LIKE b/MODULE_LICENSE_BSD_LIKE
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MODULE_LICENSE_BSD_LIKE
diff --git a/NOTICE b/NOTICE
new file mode 120000
index 0000000..d24842f
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1 @@
+COPYING \ No newline at end of file
diff --git a/src/Android.bp b/src/Android.bp
new file mode 100644
index 0000000..8184a67
--- /dev/null
+++ b/src/Android.bp
@@ -0,0 +1,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",
+ ],
+}