superenv: move check logic into superenv?

Fixes Homebrew/homebrew#16292.
This commit is contained in:
Misty De Meo 2013-03-13 10:00:07 -05:00
parent 5c746bf855
commit 16672b9d82

View File

@ -17,6 +17,8 @@ def superbin
end end
def superenv? def superenv?
not (MacSystem.xcode43_without_clt? and
MacOS.sdk_path.nil?) and # because superenv will fail to find stuff
not MacOS::Xcode.folder.nil? and # because xcrun won't work not MacOS::Xcode.folder.nil? and # because xcrun won't work
superbin and superbin.directory? and superbin and superbin.directory? and
not ARGV.include? "--env=std" not ARGV.include? "--env=std"
@ -40,7 +42,6 @@ class << ENV
def setup_build_environment def setup_build_environment
reset reset
check
ENV['CC'] = 'cc' ENV['CC'] = 'cc'
ENV['CXX'] = 'c++' ENV['CXX'] = 'c++'
ENV['OBJC'] = 'cc' ENV['OBJC'] = 'cc'
@ -61,10 +62,6 @@ class << ENV
ENV['ACLOCAL_PATH'] = determine_aclocal_path ENV['ACLOCAL_PATH'] = determine_aclocal_path
end end
def check
raise if MacSystem.xcode43_without_clt? and MacOS.sdk_path.nil?
end
def universal_binary def universal_binary
append 'HOMEBREW_CCCFG', "u", '' append 'HOMEBREW_CCCFG', "u", ''
end end