From 89720e1d20a68a19997281cf225a612b943f3361 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Mon, 28 Mar 2011 11:14:22 -0700 Subject: [PATCH] Use MacOS.xcode_prefix --- Library/Homebrew/extend/ENV.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index f0e2364ab2..0aa360504d 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -18,15 +18,13 @@ module HomebrewEnvExtension self['CMAKE_PREFIX_PATH'] = "#{HOMEBREW_PREFIX}" end - xcode_path = `/usr/bin/xcode-select -print-path`.chomp - xcode_path = "/Developer" if xcode_path.to_s.empty? if MACOS_VERSION >= 10.6 and (self['HOMEBREW_USE_LLVM'] or ARGV.include? '--use-llvm') - self['CC'] = "#{xcode_path}/usr/bin/llvm-gcc" - self['CXX'] = "#{xcode_path}/usr/bin/llvm-g++" + self['CC'] = "#{MacOS.xcode_prefix}/usr/bin/llvm-gcc" + self['CXX'] = "#{MacOS.xcode_prefix}/usr/bin/llvm-g++" cflags = ['-O4'] # link time optimisation baby! elsif MACOS_VERSION >= 10.6 and (self['HOMEBREW_USE_GCC'] or ARGV.include? '--use-gcc') - self['CC'] = "#{xcode_path}/usr/bin/gcc" - self['CXX'] = "#{xcode_path}/usr/bin/g++" + self['CC'] = "#{MacOS.xcode_prefix}/usr/bin/gcc" + self['CXX'] = "#{MacOS.xcode_prefix}/usr/bin/g++" cflags = ['-O3'] else # If these aren't set, many formulae fail to build