diff --git a/BUILD.bazel b/BUILD.bazel index 9378e690db9f..498be59b2a6e 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -5,7 +5,7 @@ # OSX it won't conflict with a build artifacts directory named "build". load("//tools:check_licenses.bzl", "check_licenses") -load("//tools:install.bzl", "install", "install_files") +load("@drake//tools:install.bzl", "install", "install_files") load("//tools:lint.bzl", "add_lint_tests") package( diff --git a/drake/BUILD b/drake/BUILD index f1bfd878ea2f..ad55866e0e2f 100644 --- a/drake/BUILD +++ b/drake/BUILD @@ -3,7 +3,7 @@ package(default_visibility = ["//visibility:public"]) -load("//tools:install.bzl", "install") +load("@drake//tools:install.bzl", "install") load("//tools:lint.bzl", "add_lint_tests") load("//tools:transitive_hdrs.bzl", "transitive_hdrs_library") diff --git a/drake/bindings/BUILD b/drake/bindings/BUILD index 638e34a78196..6ad8a920eec0 100644 --- a/drake/bindings/BUILD +++ b/drake/bindings/BUILD @@ -2,7 +2,7 @@ # This file contains rules for Bazel; see drake/doc/bazel.rst. load("//tools:gurobi.bzl", "gurobi_test_tags") -load("//tools:install.bzl", "install") +load("@drake//tools:install.bzl", "install") load("//tools:lint.bzl", "add_lint_tests") load("//tools:mosek.bzl", "mosek_test_tags") load(":pybind.bzl", "drake_pybind_cc_binary") diff --git a/drake/common/BUILD b/drake/common/BUILD index ec599ad69812..a792e1098b47 100644 --- a/drake/common/BUILD +++ b/drake/common/BUILD @@ -7,7 +7,7 @@ load( "drake_cc_googletest", "drake_cc_library", ) -load("//tools:install.bzl", "install") +load("@drake//tools:install.bzl", "install") load("//tools:lint.bzl", "add_lint_tests") package(default_visibility = ["//visibility:public"]) diff --git a/drake/lcmtypes/BUILD b/drake/lcmtypes/BUILD index 51f9b70bd4ff..e8c216553562 100644 --- a/drake/lcmtypes/BUILD +++ b/drake/lcmtypes/BUILD @@ -3,7 +3,7 @@ package(default_visibility = ["//visibility:public"]) -load("//tools:install.bzl", "install") +load("@drake//tools:install.bzl", "install") load("//tools:lcm.bzl", "lcm_cc_library", "lcm_py_library", "lcm_java_library") load("//tools:lint.bzl", "add_lint_tests") diff --git a/tools/BUILD b/tools/BUILD index 07f797f64eb5..c6c50dedcb56 100644 --- a/tools/BUILD +++ b/tools/BUILD @@ -1,7 +1,7 @@ # -*- python -*- load( - "//tools:install.bzl", + "@drake//tools:install.bzl", "cmake_config", "exports_create_cps_scripts", "install_cmake_config", diff --git a/tools/check_licenses.bzl b/tools/check_licenses.bzl index 888e56075bdf..02eb301135e6 100644 --- a/tools/check_licenses.bzl +++ b/tools/check_licenses.bzl @@ -1,5 +1,7 @@ # -*- python -*- +load("@drake//tools:install.bzl", "InstallInfo") + # List of exact file names of license files LICENSE_LITERALS = [ "BSD-LICENSE", # ccd @@ -32,12 +34,12 @@ def _is_license_file(filename): def _check_licenses_for_label(label): # Don't check empty installs (can happen if an install is a dummy due to # some platforms relying on a package already being installed). - if not label.install_actions: + if not label[InstallInfo].install_actions: return [] # Look for file(s) that appear to be license(s) in the install actions. has_license = False - for a in label.install_actions: + for a in label[InstallInfo].install_actions: if _is_license_file(a.src.basename): has_license = True @@ -62,7 +64,7 @@ def _check_licenses_impl(ctx): _check_licenses = rule( attrs = { - "install_labels": attr.label_list(providers = ["install_actions"]), + "install_labels": attr.label_list(providers = [InstallInfo]), }, implementation = _check_licenses_impl, ) diff --git a/tools/install.bzl b/tools/install.bzl index 8644d4b28650..16c9557f4f27 100644 --- a/tools/install.bzl +++ b/tools/install.bzl @@ -228,7 +228,7 @@ def _install_impl(ctx): # Collect install actions from dependencies. for d in ctx.attr.deps: - actions += d.install_actions + actions += d[InstallInfo].install_actions # Generate actions for data, docs and includes. actions += _install_actions(ctx, ctx.attr.docs, ctx.attr.doc_dest, @@ -273,14 +273,17 @@ def _install_impl(ctx): # Return actions. files = ctx.runfiles(files = [a.src for a in actions]) - return InstallInfo(install_actions = actions, runfiles = files) + return [ + InstallInfo(install_actions = actions), + DefaultInfo(runfiles = files), + ] # TODO(mwoehlke-kitware) default guess_data to PACKAGE when we have better # default destinations. install = rule( # Update buildifier-tables.json when this changes. attrs = { - "deps": attr.label_list(providers = ["install_actions"]), + "deps": attr.label_list(providers = [InstallInfo]), "docs": attr.label_list(allow_files = True), "doc_dest": attr.string(default = "share/doc/@WORKSPACE@"), "doc_strip_prefix": attr.string_list(), @@ -412,7 +415,7 @@ def _install_files_impl(ctx): rename = ctx.attr.rename) # Return computed actions. - return InstallInfo(install_actions = actions) + return [InstallInfo(install_actions = actions)] install_files = rule( # Update buildifier-tables.json when this changes. diff --git a/tools/install/gflags/BUILD b/tools/install/gflags/BUILD index 535395b10c64..9bc372982627 100644 --- a/tools/install/gflags/BUILD +++ b/tools/install/gflags/BUILD @@ -1,6 +1,11 @@ # -*- python -*- -load("//tools:install.bzl", "cmake_config", "install", "install_cmake_config") +load( + "@drake//tools:install.bzl", + "cmake_config", + "install", + "install_cmake_config", +) load("//tools:lint.bzl", "add_lint_tests") package(default_visibility = ["//visibility:public"]) diff --git a/tools/install/jchart2d/BUILD b/tools/install/jchart2d/BUILD index 5c13ef522999..720b759394b4 100644 --- a/tools/install/jchart2d/BUILD +++ b/tools/install/jchart2d/BUILD @@ -1,6 +1,11 @@ # -*- python -*- -load("//tools:install.bzl", "cmake_config", "install", "install_cmake_config") +load( + "@drake//tools:install.bzl", + "cmake_config", + "install", + "install_cmake_config", +) load("//tools:lint.bzl", "add_lint_tests") package(default_visibility = ["//visibility:public"]) diff --git a/tools/install/optitrack_driver/BUILD b/tools/install/optitrack_driver/BUILD index af0d24a07c02..8a401d018826 100644 --- a/tools/install/optitrack_driver/BUILD +++ b/tools/install/optitrack_driver/BUILD @@ -1,6 +1,11 @@ # -*- python -*- -load("//tools:install.bzl", "cmake_config", "install", "install_cmake_config") +load( + "@drake//tools:install.bzl", + "cmake_config", + "install", + "install_cmake_config", +) load("//tools:lint.bzl", "add_lint_tests") package(default_visibility = ["//visibility:public"]) diff --git a/tools/install/protobuf/BUILD b/tools/install/protobuf/BUILD index 774826c7beab..23d21f3db782 100644 --- a/tools/install/protobuf/BUILD +++ b/tools/install/protobuf/BUILD @@ -1,6 +1,11 @@ # -*- python -*- -load("//tools:install.bzl", "cmake_config", "install", "install_cmake_config") +load( + "@drake//tools:install.bzl", + "cmake_config", + "install", + "install_cmake_config", +) load("//tools:lint.bzl", "add_lint_tests") package(default_visibility = ["//visibility:public"]) diff --git a/tools/lcm.BUILD b/tools/lcm.BUILD index 8aa33f235924..0f6741f957e4 100644 --- a/tools/lcm.BUILD +++ b/tools/lcm.BUILD @@ -180,7 +180,7 @@ java_library( srcs = glob(["lcm-java/lcm/**/*.java"]), javacopts = [ # Suppressed until lcm-proj/lcm#159 is fixed. - "-extra_checks:off", + "-XepDisableAllChecks", ], runtime_deps = [ "@com_jidesoft_jide_oss//jar",