aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-09-29 09:57:37 -0400
committerMax Howell2012-09-29 09:57:37 -0400
commit64927a45ef62f8dc0b86a46ac38c91954494bb8f (patch)
treef713ed020f1645a064165b9f209feaf9b76a3e99 /Library
parent532c849b58690b3dd400b852d4bfb9c739f8c2cf (diff)
downloadbrew-64927a45ef62f8dc0b86a46ac38c91954494bb8f.tar.bz2
Restore HOMEBREW_LOG functionality
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/ENV/4.3/cc12
-rwxr-xr-xLibrary/ENV/4.3/xcrun2
-rw-r--r--Library/ENV/libsuperenv.rb15
3 files changed, 12 insertions, 17 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index b027c789a..840ffc94b 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 a5a004ff1..3526c804c 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 1a2de292b..49c2d7d2e 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