Modified: MacRuby/trunk/rakelib/builder/options.rb (3413 => 3414)
--- MacRuby/trunk/rakelib/builder/options.rb 2010-02-02 20:58:45 UTC (rev 3413)
+++ MacRuby/trunk/rakelib/builder/options.rb 2010-02-02 23:07:59 UTC (rev 3414)
@@ -22,15 +22,22 @@
ARCHS =
if s = ENV['RC_ARCHS']
- $stderr.puts "getting archs from RC_ARCHS!"
+ $stderr.puts "Getting archs from RC_ARCHS!"
s.strip.split(/\s+/)
else
b.option('archs', `arch`.include?('ppc') ? 'ppc' : %w{i386 x86_64}) { |x| x.split(',') }
end
+llvm_default_path = '/usr/local'
+if `sw_vers -productVersion`.strip.to_f >= 10.7 and File.exist?('/AppleInternal')
+ $stderr.puts "Welcome bleeding-edge adventurer!"
+ llvm_default_path = '/Developer/usr/local'
+ ENV['LLVM_TOT'] = '1'
+end
+
RUBY_INSTALL_NAME = b.option('ruby_install_name', 'macruby')
RUBY_SO_NAME = b.option('ruby_so_name', RUBY_INSTALL_NAME)
-LLVM_PATH = b.option('llvm_path', '/usr/local')
+LLVM_PATH = b.option('llvm_path', llvm_default_path)
FRAMEWORK_NAME = b.option('framework_name', 'MacRuby')
FRAMEWORK_INSTDIR = b.option('framework_instdir', '/Library/Frameworks')
SYM_INSTDIR = b.option('sym_instdir', '/usr/local')