diff options
| author | Max Howell | 2012-02-16 23:39:57 +0000 |
|---|---|---|
| committer | Max Howell | 2012-02-16 23:43:43 +0000 |
| commit | 4504662033ae7e82659548d70dd1475e8c3a6e12 (patch) | |
| tree | 0988d5b504b0946a0ea3ea75a0da90be802f4b76 /Library/Homebrew/cmd | |
| parent | 59bd97bb893fd12e99d446aaa8abceb73c5b7afa (diff) | |
| download | brew-4504662033ae7e82659548d70dd1475e8c3a6e12.tar.bz2 | |
Use xcrun; Ensure clang is the default compiler with Xcode 4.3
Using xcrun as a proxy to execute the compiler tools is per its design. This means you can't treat ENV['CC'] as a path anymore, but I think I found the cases this was being expected and corrected them. It was not proper anyway to assume the variable was a path, it can be anything. Like a proxy. Like xcrun.
Also more thoroughly clear ENV.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/--env.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/--env.rb b/Library/Homebrew/cmd/--env.rb index f8dcb0f47..7d9796061 100644 --- a/Library/Homebrew/cmd/--env.rb +++ b/Library/Homebrew/cmd/--env.rb @@ -18,9 +18,11 @@ module Homebrew extend self value = env[k] if value results = value - if File.exists? value and File.symlink? value - target = Pathname.new(value) - results += " => #{target.realpath}" + if value =~ %r{^/usr/bin/xcrun (.*)} + path = `/usr/bin/xcrun -find #{$1}` + results += " => #{path}" + elsif File.exists? value and File.symlink? value + results += " => #{Pathname.new(value).realpath}" end puts "#{k}: #{results}" end |
