bazelbuild / rules_foreign_cc

Build rules for interfacing with "foreign" (non-Bazel) build systems (CMake, configure-make, GNU Make, boost, ninja, Meson)
https://bazelbuild.github.io/rules_foreign_cc
Apache License 2.0
649 stars 232 forks source link

Allow `prefix` to be set as an absolute path in `configure` #1151

Open mishazharov opened 6 months ago

mishazharov commented 6 months ago

This PR allows setting the --prefix flag to an absolute path for configure. When make is invoked, targets that start with install or uninstall are given a DESTDIR flag which instructs make to place the install output into the directory that the rules expect the installed files to be in.

Since there could be some shortfalls with this approach of setting the prefix flag (namely if make doesn't support DESTDIR for some reason) this new option is specified as "experimental"

Closes https://github.com/bazelbuild/rules_foreign_cc/issues/823

mishazharov commented 4 months ago

@jsharpe Can you please take a look at this PR if you have a chance? It simplified some of our build setup because binaries aren't confused about where they're being executed from