aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMax Howell2009-09-04 15:42:19 +0100
committerMax Howell2009-09-04 15:54:27 +0100
commitd11165cd97912e22e07ec67c040dafb2b9f9c78f (patch)
tree831f37d9ad79faae7ea45755e6f262459dc9d7a1 /bin
parent4d940628cc71c57e63f9c414199db7cee6ff549d (diff)
downloadbrew-d11165cd97912e22e07ec67c040dafb2b9f9c78f.tar.bz2
Fixes Homebrew/homebrew#30 -- GCC can't create executables
The fix is to error out if GCC isn't installed, and to ensure we aren't setting CC and CXX to something that doesn't exist.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/brew b/bin/brew
index e58fa38db..b8e726c60 100755
--- a/bin/brew
+++ b/bin/brew
@@ -75,13 +75,18 @@ begin
exit 0
end
+ require 'brewkit'
+
if ARGV.verbose?
- require 'brewkit'
ohai "Build Environment"
%w[CFLAGS LDFLAGS CPPFLAGS MAKEFLAGS CC CXX].each do |f|
puts "#{f}: #{ENV[f]}" unless ENV[f].to_s.empty?
end
end
+
+ unless system "which #{ENV['CC'] or 'cc'} &> /dev/null" and $?.success?
+ raise "We cannot find a c compiler, have you installed the latest Xcode?"
+ end
# we need to ensure a pristine ENV for each process or the formula
# will start with the ENV from the previous build