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>
This commit is contained in:
parent
57b2fbb598
commit
05b43db45d
2
third_party/systemlibs/jsoncpp.BUILD
vendored
2
third_party/systemlibs/jsoncpp.BUILD
vendored
@ -23,7 +23,7 @@ genrule(
|
||||
cmd = """
|
||||
for i in $(OUTS); do
|
||||
i=$${i##*/}
|
||||
ln -vsf /usr/include/jsoncpp/json/$$i $(@D)/include/json/$$i
|
||||
ln -sf $(INCLUDEDIR)/jsoncpp/json/$$i $(@D)/include/json/$$i
|
||||
done
|
||||
""",
|
||||
)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user