2013-06-01 16:27:53 -05:00
|
|
|
require 'hardware'
|
2013-08-19 12:32:59 -05:00
|
|
|
require 'extend/ENV/shared'
|
2013-08-19 12:32:59 -05:00
|
|
|
require 'extend/ENV/std'
|
2013-08-19 12:32:59 -05:00
|
|
|
require 'extend/ENV/super'
|
2013-08-19 12:32:57 -05:00
|
|
|
|
|
|
|
def superenv?
|
|
|
|
return false if MacOS::Xcode.without_clt? && MacOS.sdk_path.nil?
|
|
|
|
return false unless Superenv.bin && Superenv.bin.directory?
|
|
|
|
return false if ARGV.include? "--env=std"
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
|
|
|
module EnvActivation
|
|
|
|
def activate_extensions!
|
|
|
|
if superenv?
|
|
|
|
extend(Superenv)
|
|
|
|
else
|
2013-08-19 12:32:59 -05:00
|
|
|
extend(Stdenv)
|
2013-08-19 12:32:57 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
ENV.extend(EnvActivation)
|