Skip to content

Commit

Permalink
do not include stdlib files for compilation and spawn macrubyc from t…
Browse files Browse the repository at this point in the history
…he current ruby's bindir

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/branches/vm-mcache@3929 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information
lrz committed Apr 14, 2010
1 parent 57119dd commit f11165f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/ruby_deploy
Expand Up @@ -83,17 +83,18 @@ class Deployer
end

def compile_files
Dir.glob(File.join(@app_bundle, 'Contents/Resources/*.rb')) +
Dir.glob(File.join(app_macruby_usr, '**/*.rb'))
Dir.glob(File.join(@app_bundle, 'Contents/Resources/*.rb'))
end

MACRUBYC = File.join(RbConfig::CONFIG['bindir'], 'macrubyc')

def compile
compile_files.each do |source|
base = File.basename(source, '.rb')
next if base == 'rb_main'
obj = File.join(File.dirname(source), base + '.rbo')
if !File.exist?(obj) or File.mtime(source) > File.mtime(obj)
compile_cmd = "macrubyc -C \"#{source}\" -o \"#{obj}\""
compile_cmd = "#{MACRUBYC} -C \"#{source}\" -o \"#{obj}\""
# Use Xcode ARCHS env var to determine which archs to compile for
compile_cmd += ENV['ARCHS'].strip.split.map { |a| " -a #{a}" }.join if ENV['ARCHS']
execute(compile_cmd, "Can't compile \"#{source}\"")
Expand Down

0 comments on commit f11165f

Please sign in to comment.