From 64927a45ef62f8dc0b86a46ac38c91954494bb8f Mon Sep 17 00:00:00 2001 From: Max Howell Date: Sat, 29 Sep 2012 09:57:37 -0400 Subject: [PATCH] Restore HOMEBREW_LOG functionality --- Library/ENV/4.3/cc | 12 ++++++++++++ Library/ENV/4.3/xcrun | 2 -- Library/ENV/libsuperenv.rb | 15 --------------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index b027c789aa..840ffc94bd 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -21,6 +21,18 @@ def syspath %W{/usr /usr/local} end end +def exec *args + path = File.expand_path('~/Library/Logs/Homebrew/cc.log') + open(path, 'a') do |f| + f.print '[', $0 + f.print " -%s" % ENV['HOMEBREW_CCCFG'] if ENV['HOMEBREW_CCCFG'] + f.print '] ' + f.puts args.join(' ') + f.puts + end + Kernel.exec *args +end if ENV['HOMEBREW_LOG'] + class Cmd def initialize path, args diff --git a/Library/ENV/4.3/xcrun b/Library/ENV/4.3/xcrun index a5a004ff12..3526c804c1 100755 --- a/Library/ENV/4.3/xcrun +++ b/Library/ENV/4.3/xcrun @@ -4,8 +4,6 @@ # But many build-systems expect it to work. This fixes that. # NOTE only works if the build-tool calls xcrun without a path prefixed! -ENV['HOMEBREW_LOG'] = nil - require "#{File.dirname __FILE__}/../libsuperenv" SUPERBIN = __FILE__.dirname.cleanpath.freeze diff --git a/Library/ENV/libsuperenv.rb b/Library/ENV/libsuperenv.rb index 1a2de292b9..49c2d7d2eb 100644 --- a/Library/ENV/libsuperenv.rb +++ b/Library/ENV/libsuperenv.rb @@ -25,20 +25,5 @@ class Array end end -module Kernel extend self - alias :_exec :exec - def exec *args - path = File.expand_path('~/Library/Logs/Homebrew/cc.log') - open(path, 'a') do |f| - f.print '[', $0 - f.print " -%s" % ENV['HOMEBREW_CCCFG'] if ENV['HOMEBREW_CCCFG'] - f.print '] ' - f.puts args.join(' ') - f.puts - end - _exec *args - end -end if ENV['HOMEBREW_LOG'] - $brewfix = "#{__FILE__}/../../../".cleanpath.freeze $sdkroot = ENV['HOMEBREW_SDKROOT'].freeze