Internal change PiperOrigin-RevId: 511351442 Change-Id: I88a5e251928b077c3d8f1a9065cd352357385b7f
diff --git a/BUILD.bazel b/BUILD.bazel index 8e75002..2049b33 100644 --- a/BUILD.bazel +++ b/BUILD.bazel
@@ -1,6 +1,10 @@ # Bazel build rules for Fuzzyc. load("@fuzzyc_deps//:requirements.bzl", "requirement") +package(default_visibility = [ + "//visibility:public", +]) + genrule( name = "fuzzyc_cc_module_sources", srcs = [ @@ -19,7 +23,11 @@ "ModuleBaseListener.cpp", "ModuleBaseListener.h", ], - cmd = "$(locations @fuzzyc_deps_antlr4_tools//:rules_python_wheel_entry_point_antlr4) -o $(@D) -Dlanguage=Cpp -package fuzzyc_cc_module $(SRCS)", + cmd = " ".join([ + "$(locations @fuzzyc_deps_antlr4_tools//:rules_python_wheel_entry_point_antlr4) -o", + "$(RULEDIR) -Dlanguage=Cpp -package fuzzyc_cc_module $(SRCS);", + "find $(RULEDIR) \\( -name *.cpp -o -name *.h \\) -exec cp -n {} $(RULEDIR) \\;", + ]), tools = [ requirement("antlr4-tools"), "@fuzzyc_deps_antlr4_tools//:rules_python_wheel_entry_point_antlr4", @@ -44,7 +52,11 @@ "FunctionBaseListener.cpp", "FunctionBaseListener.h", ], - cmd = "$(locations @fuzzyc_deps_antlr4_tools//:rules_python_wheel_entry_point_antlr4) -o $(@D) -Dlanguage=Cpp -package fuzzyc_cc_function $(SRCS)", + cmd = " ".join([ + "$(locations @fuzzyc_deps_antlr4_tools//:rules_python_wheel_entry_point_antlr4) -o", + "$(RULEDIR) -Dlanguage=Cpp -package fuzzyc_cc_function $(SRCS);", + "find $(RULEDIR) \\( -name *.cpp -o -name *.h \\) -exec cp -n {} $(RULEDIR) \\;", + ]), tools = [ requirement("antlr4-tools"), "@fuzzyc_deps_antlr4_tools//:rules_python_wheel_entry_point_antlr4",