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 Homebrew/homebrew#16805.
Closes Homebrew/homebrew#16846.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Adam Vandenberg 2013-01-02 11:08:44 -08:00
parent 7a4facae2f
commit a5e969dfb5
2 changed files with 2 additions and 1 deletions

View File

@ -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 "$@"

View File

@ -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?