diff options
| author | Max Howell | 2009-10-08 23:40:31 +0100 |
|---|---|---|
| committer | Max Howell | 2009-10-09 00:09:05 +0100 |
| commit | c2fbc971000e8e4628bb63e835bf1cebba9544c8 (patch) | |
| tree | 68ac4feb3a1266e1fbd9522c54a14f1787d93301 /Library/Homebrew | |
| parent | c2f8494b2b9bfac9e071ef184a45d558d84a88fd (diff) | |
| download | homebrew-c2fbc971000e8e4628bb63e835bf1cebba9544c8.tar.bz2 | |
Determine LLVM location programmatically
Xcode can be installed anywhere, not just /Developer.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/brewkit.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/brewkit.rb b/Library/Homebrew/brewkit.rb index 3d25edc92..2dfa27a97 100644 --- a/Library/Homebrew/brewkit.rb +++ b/Library/Homebrew/brewkit.rb @@ -46,7 +46,11 @@ else end if MACOS_VERSION >= 10.6 or ENV['HOMEBREW_USE_LLVM'] - ENV['PATH'] = "/Developer/usr/llvm-gcc-4.2/bin:#{ENV['PATH']}" + # you can install Xcode wherever you like you know. + prefix = `/usr/bin/xcode-select -print-path`.chomp + prefix = "/Developer" if prefix.to_s.empty? + + ENV['PATH'] = "#{prefix}/usr/llvm-gcc-4.2/bin:#{ENV['PATH']}" ENV['CC'] = 'llvm-gcc-4.2' ENV['CXX'] = 'llvm-g++-4.2' cflags = ['-O4'] # O4 baby! |
