aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Jason Zaman <jason@perfinion.com>2018-08-15 15:20:56 +0800
committerGravatar Jason Zaman <jason@perfinion.com>2018-09-22 10:31:26 +0800
commit05b43db45d23a32e51bf064946dae868e98396bd (patch)
treee58aba13760939852fc268db92bba39ce2584ae7 /tools
parent57b2fbb59804497c3860106e70323405cc1871bf (diff)
systemlibs: allow building with PREFIX other than /usr
Some use-cases want to build packages in a different path than /usr. For example to have a set of packages independent from other system binaries. This change allows building with bazel build --define=PREFIX=/some/other/path to search that path instead. The default of /usr is set in bazelrc so that building with no options will work as before and setting PREFIX on the commandline or later in the bazelrc will override that setting if desired. PREFIX is not used by the bundled build so should not affect that at all. This also adds a few other standard Make variables that can be overridden independently if needed. Signed-off-by: Jason Zaman <jason@perfinion.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/bazel.rc5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/bazel.rc b/tools/bazel.rc
index 601e07ffdd..ccf62629d1 100644
--- a/tools/bazel.rc
+++ b/tools/bazel.rc
@@ -67,3 +67,8 @@ build -c opt
# Modular TF build options
build:dynamic_kernels --define=dynamic_loaded_kernels=true
+
+# Default paths for TF_SYSTEM_LIBS
+build --define=PREFIX=/usr
+build --define=LIBDIR=$(PREFIX)/lib
+build --define=INCLUDEDIR=$(PREFIX)/include