diff options
author | cgrushko <carmi.grushko@gmail.com> | 2017-02-08 12:19:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-08 12:19:40 -0500 |
commit | 6fffd4adb4dc6c27784be18132ec0b7254b927cc (patch) | |
tree | bb25ffe1d57ed351083524db7d0e85bf949de046 /protobuf.bzl | |
parent | c00274313d03a0a7f10e8f6473541faf3739353b (diff) | |
download | protobuf-6fffd4adb4dc6c27784be18132ec0b7254b927cc.tar.gz protobuf-6fffd4adb4dc6c27784be18132ec0b7254b927cc.tar.bz2 protobuf-6fffd4adb4dc6c27784be18132ec0b7254b927cc.zip |
Bazel can build protobuf when it's not in the root
That is, Bazel can now build protobuf when the latter resides in a subdirectory of a project.
Diffstat (limited to 'protobuf.bzl')
-rw-r--r-- | protobuf.bzl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/protobuf.bzl b/protobuf.bzl index 41a46f75..73c396d5 100644 --- a/protobuf.bzl +++ b/protobuf.bzl @@ -263,10 +263,11 @@ def internal_gen_well_known_protos_java(srcs): srcs: the well known protos """ root = Label("%s//protobuf_java" % (REPOSITORY_NAME)).workspace_root + pkg = PACKAGE_NAME + "/" if PACKAGE_NAME else "" if root == "": - include = " -Isrc " + include = " -I%ssrc " % pkg else: - include = " -I%s/src " % root + include = " -I%s/%ssrc " % (root, pkg) native.genrule( name = "gen_well_known_protos_java", srcs = srcs, |