aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorRobert Shaw2010-03-16 13:08:32 -0700
committerAdam Vandenberg2010-03-16 20:46:10 -0700
commitca313defe4658d16c003871ef63784fe0b7d1d49 (patch)
tree85ef05019bf90e39cf63c08c8d014ca5caedd151 /Library
parent098b97801bbc237dc9a4105c5a016478dfdcdb9c (diff)
downloadbrew-ca313defe4658d16c003871ef63784fe0b7d1d49.tar.bz2
Add GCC 4.0 info to --config output.
* Adds GCC 4.0 version info to --config output. * Splits gcc_build into gcc_40_build and gcc_42_build. * Adds alias gcc_build to gcc_42_build for compatibility. * Updates Xcode checking to also check GCC 4.0 version. These changes are a combination of work by AdamV and my work on my Tiger branch. This information would be useful for all installs since some formulae compile with GCC 4.0. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew.h.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb
index 6ca3fc157..92a682d72 100644
--- a/Library/Homebrew/brew.h.rb
+++ b/Library/Homebrew/brew.h.rb
@@ -494,7 +494,7 @@ private
end
end
-def gcc_build
+def gcc_42_build
`/usr/bin/gcc-4.2 -v 2>&1` =~ /build (\d{4,})/
if $1
$1.to_i
@@ -508,6 +508,16 @@ def gcc_build
nil
end
end
+alias :gcc_build :gcc_42_build # For compatibility
+
+def gcc_40_build
+ `/usr/bin/gcc-4.0 -v 2>&1` =~ /build (\d{4,})/
+ if $1
+ $1.to_i
+ else
+ nil
+ end
+end
def llvm_build
if MACOS_VERSION >= 10.6