-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathBUILD
More file actions
30 lines (25 loc) · 844 Bytes
/
BUILD
File metadata and controls
30 lines (25 loc) · 844 Bytes
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
# Copyright 2018 Google LLC.
# SPDX-License-Identifier: Apache-2.0
package(default_visibility = ["//visibility:public"])
load("//jflex:jflex.bzl", "jflex")
# The target that generates the java code from the flex specification.
# This is what the //jflex:jflex.bzl rule provides :-)
jflex(
name = "gen_hello_lexer",
srcs = ["helloworld.flex"],
outputs = ["HelloWorld.java"],
visibility = ["//visibility:private"],
)
# A Java library that other programs can depend on.
# Not very useful because it's only public method is main.
# Well, it can be used in a hava_binary. See below.
java_library(
name = "helloworld",
srcs = [":gen_hello_lexer"],
)
# Executable version of the lexer
java_binary(
name = "helloworld_bin",
main_class = "jflex.examples.helloworld.HelloWorld",
runtime_deps = [":helloworld"],
)