aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2013-01-02 11:08:44 -0800
committerAdam Vandenberg2013-01-03 09:14:36 -0800
commit3e1ec41bf9586764aa6626bb07a1aab6f8d0338e (patch)
tree09b0a464565354cc8766eb1aac1ecf8e00368970 /Library
parent111971b591128cac6b287648277c3729059ac801 (diff)
downloadhomebrew-3e1ec41bf9586764aa6626bb07a1aab6f8d0338e.tar.bz2
superenv: make HOMEBREW_FILE available
Superenv scripts have a stripped PATH, which may not include the brew binary itself. Make this explicitly available to superenv scripts. Fixes bsdmake wrapper. Closes #16805. Closes #16846. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/ENV/4.3/make2
-rw-r--r--Library/Homebrew/superenv.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/Library/ENV/4.3/make b/Library/ENV/4.3/make
index b3df33114..1d717718b 100755
--- a/Library/ENV/4.3/make
+++ b/Library/ENV/4.3/make
@@ -4,7 +4,7 @@ if [ $(basename "$0") == "bsdmake" ]; then
pwd="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
bsd="$pwd/../../../bin/bsdmake"
# bsdmake used to be keg-only: support users who don't run brew doctor
- [ -x "$bsd" ] || bsd="$(brew --prefix bsdmake)/bin/bsdmake"
+ [ -x "$bsd" ] || bsd="$(${HOMEBREW_BREW_FILE} --prefix bsdmake)/bin/bsdmake"
exec "$bsd" "$@"
else
exec xcrun make "$@"
diff --git a/Library/Homebrew/superenv.rb b/Library/Homebrew/superenv.rb
index e8eecb5bd..291f9e873 100644
--- a/Library/Homebrew/superenv.rb
+++ b/Library/Homebrew/superenv.rb
@@ -51,6 +51,7 @@ class << ENV
ENV['PKG_CONFIG_PATH'] = determine_pkg_config_path
ENV['HOMEBREW_CC'] = determine_cc
ENV['HOMEBREW_CCCFG'] = determine_cccfg
+ ENV['HOMEBREW_BREW_FILE'] = HOMEBREW_BREW_FILE
ENV['HOMEBREW_SDKROOT'] = "#{MacOS.sdk_path}" if MacSystem.xcode43_without_clt?
ENV['CMAKE_PREFIX_PATH'] = determine_cmake_prefix_path
ENV['CMAKE_FRAMEWORK_PATH'] = "#{MacOS.sdk_path}/System/Library/Frameworks" if MacSystem.xcode43_without_clt?